cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Incorrect variable value - Mathcad 15

DanielvanS.
1-Newbie

Incorrect variable value - Mathcad 15

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.

8 REPLIES 8

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

MikeArmstrong
5-Regular Member
(To:DanielvanS.)

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

Mike,

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

- Daniel

RichardJ
19-Tanzanite
(To:DanielvanS.)

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.

MikeArmstrong
5-Regular Member
(To:DanielvanS.)

That's a shame, can you try and replicate the problem again.


Mike

Tried but to replicate it, but no luck Next time, I'll keep a copy of the problem file, even if I find the fix...

Thanks!

Actually, I have had similar problems (in 14) but its rare and, best I can reacall, occurs in long files or perhaps after using lot of files without closing Mathcad, so I think only happens when resources are low.

If it happens again, and the above is the case, try closing Mathcad and starting again. If the file is long, then you can try to break into two files, referencing in the first file into the second. (I havn't looked at the file, but others have so my guess is that it is not too long)

Wayne

Actually, it's about a dozen pages. Don't know if that qualifes as long. In any case, my box doesn't have much RAM.

I'll be more careful in the future with files that go past a few pages.

Thanks for the tip!

Daniel

Top Tags