Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Tag × protected in Mathematica?

Tags:
  1. Feb 18, 2014 #1
    Instead of giving the results of the calculation, Mathematica says:

    "Tag Times in 0 × 1.52098*10^11 is Protected."

    as in the attached file. Anyone has any idea how to get the results?
     

    Attached Files:

  2. jcsd
  3. Feb 18, 2014 #2

    DrClaude

    User Avatar

    Staff: Mentor

    The line
    Code (Text):
    If[Or[i == 100000, i == 200000, i = 300000],
    should read
    Code (Text):
    If[Or[i == 100000, i == 200000, i == 300000],
     
  4. Feb 18, 2014 #3
    It still says tag is protected, but also prints the results, which is what I want.
     
  5. Feb 18, 2014 #4

    Mark44

    Staff: Mentor

    Also, there's a right bracket missing in both expressions above.
     
  6. Feb 18, 2014 #5
    The right bracket is not missing, since the whole sentence is:

    If[Or[i == 100000, i == 200000, i == 300000],
    Print[NumberForm[x, 13], "\t", NumberForm[y, 13], "\t",
    NumberForm[r, 13], "\t", u, "\t", v, "\t", NumberForm[w, 6], "\t",
    i*h, "\t", NumberForm[average, 13]]]
     
  7. Feb 18, 2014 #6
    Change

    i = 300000

    to

    i == 300000

    and

    If[r < j, j = r]

    to

    If[r < j, j = r];

    and your problems seem to go away
     
    Last edited: Feb 18, 2014
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Tag × protected in Mathematica?
  1. In mathematica (Replies: 4)

  2. LaTeX Equation Tag (Replies: 2)

  3. Help with Mathematica? (Replies: 1)

Loading...