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

Odd Solve Loop Bug

KevinHardin
1-Newbie

Odd Solve Loop Bug

I am kind of new to MathCAD but I seem to be having a strange bug. I have a simple solve loop that works in one sheet. When I copy it to a new sheet I get the error "This variable is undefined". I can't seem to find any reason why it will work in the current sheet but won't in another one.

I attached the working copy. Can anyone else copy the entire loop into a new worksheet and have it still work?

Thanks in advanced.

Broken

Solve Loop Broken.JPG

Working

inSolve Loop Working.bmp

1 ACCEPTED SOLUTION

Accepted Solutions

If you look on the original worksheet under Tools/Worksheet Options.../Calculation you will see that the 0/0=0 box is checked. When you copy to a new sheet, the default is that the 0/0=0 box is unchecked. So, at some point in the calculation a 0/0 occurs.

To avoid the problem you can either check the 0/0=0 box in the copy sheet, or simply replace the initial guess by 2 (which doesn't seem to incur a 0/0 problem).

Alan

View solution in original post

1 REPLY 1

If you look on the original worksheet under Tools/Worksheet Options.../Calculation you will see that the 0/0=0 box is checked. When you copy to a new sheet, the default is that the 0/0=0 box is unchecked. So, at some point in the calculation a 0/0 occurs.

To avoid the problem you can either check the 0/0=0 box in the copy sheet, or simply replace the initial guess by 2 (which doesn't seem to incur a 0/0 problem).

Alan

Announcements