nikolafmf Messages 112 Reaction score 0 Thread starter 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? Attachments Runge-Kutta.nb Runge-Kutta.nb 22 KB · Views: 626
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?
DrClaude Mentor Messages 8,478 Reaction score 5,699 Feb 18, 2014 #2 The line Code: If[Or[i == 100000, i == 200000, i = 300000], should read Code: If[Or[i == 100000, i == 200000, i == 300000],
The line Code: If[Or[i == 100000, i == 200000, i = 300000], should read Code: If[Or[i == 100000, i == 200000, i == 300000],
nikolafmf Messages 112 Reaction score 0 Feb 18, 2014 #3 It still says tag is protected, but also prints the results, which is what I want.
Mark44 Mentor Insights Author Messages 38,138 Reaction score 10,726 Feb 18, 2014 #4 DrClaude said: The line Code: If[Or[i == 100000, i == 200000, i = 300000], should read Code: If[Or[i == 100000, i == 200000, i == 300000], Also, there's a right bracket missing in both expressions above.
DrClaude said: The line Code: If[Or[i == 100000, i == 200000, i = 300000], should read Code: If[Or[i == 100000, i == 200000, i == 300000], Also, there's a right bracket missing in both expressions above.
nikolafmf Messages 112 Reaction score 0 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]]]
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]]]
Bill Simpson Messages 1,077 Reaction score 33 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
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