Skip to main content
1-Visitor
January 21, 2011
Question

Incorrect variable value - Mathcad 15

  • January 21, 2011
  • 2 replies
  • 4814 views

Declared a variable, Dsling.7 (the ".7" is what I typed in to get a subscript 7). When it was used in equation, Mathcad 15 used the value of a previously defined variable (i.e. above Dsling.7), Dsling.6. The fix for this was to cut the equation, and then paste it back in.

Tested the value of the variable by entering the expression "Dsling.7 =" and got the value of Dsling.6 when it was placed after the equation (and after the variable declaration for Dsling.7), but the correct when value when placed before the equation (but still after the declaration for Dsling.7).

The final fix was to retype all variable declarations after "Dsling.7 :=", then cut and repaste the equation, working my way down the page.

Mathcad 15 didn't indicate that there were any errors when it was giving the wrong value.

Version used: Mathcad 15.0 (M005 [MC15_M005_20101105])

Incorrect value (equal to Dsling.6)

Dsling.7 := 213mm

Equation

Dsling.7 = 285mm

Correct value (after retyping all of the variable declarations following "Dsling.7 :=", then cutting the equation and pasting it back at the same location):

Dsling.7 := 213mm Dsling.7 := 213mm

Dsling.7 = 213mm and Equation

Equation Dsling.7 := 213mm

Has anyone experienced anything similar to this?

If I did something wrong, what should I do differently?

Thanks,

Daniel van S.

2 replies

12-Amethyst
January 21, 2011

Hi Daniel,

First, welcome to the PlanetPTC. Second, I moved your discussion into the Mathcad community to get the right members' eyes on your question.

I look forward to seeing your Mathcad solutions.

Thanks,

Dan

1-Visitor
January 21, 2011

I have just tried to replicate your problem without any success. It work fine for me and I have the same Mathcad version.

Can you provide the worksheet?

Mike

1-Visitor
January 21, 2011

Mike,

Unfortunately, I don't have a copy of the file which still has the problem. I just have the fixed file.

- Daniel

19-Tanzanite
January 21, 2011

I have never seen this, or heard of it. If it happens again save the problem worksheet. Without it, I don't it's possible for anyone to fix the problem.