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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Is this a bug, or something that I'm doing wrong?

ptc-3031221
1-Visitor

Is this a bug, or something that I'm doing wrong?

Often when I'm doing Mathcad calcuations, I define some symbolic variables according to either number values or functions of symbolic variables, and then I use the results as intermediate results for subsequent calculations. I've encountered several cases where the calculations that reference the intermediate result variables say that the variables are undefined (referenced intermediate variables display in red, and final calculations fail to execute), when the intermediate values ARE defined (I am able to view the variables' values via the use of the simple '=' 'evaluate numerically operator in the space just before the calculation that is failing to reference it). I've found that displaying the results of the intermediate calculation on the end of the intermediate calcuation solves this problem (so the intermediate result is defined with the ':=' and then immediately displayed via the '=', but when I'm doing calculations where the intermediate results are whole matrices of numbers, it gets annoying to display them all on the screen, and to troubleshoot which calcs need this this extra '=' in order to allow my program to work. I realize that I can work around this by compacting the matrices so they only display a few cells of each matrix, but it would be better if I didn't even have to show them at all.

Does anyone know if this is actually a bug, or if there's something I might be not doing correctly when I'm writing my code?

7 REPLIES 7
StuartBruff
23-Emerald III
(To:ptc-3031221)

Could you please post an example? What version of Mathcad are you using?

Stuart

I'm using version 14. I'll post an example if I can get a good one isolated, but that isn't so easy because my program relies heavily on externally linked Excel data.

I thnk I've experienced this also at times. For me, the solution was to ask the entire worksheet to recalculate, not just update. So when you see this next, just try that.

What exactly is the difference between recalcuate and update? The only one I know is the equals sign button in the toolbar ("calculate"). What are the commands for each one?

Tools>Calculate>Calculate worksheet is one option. Easier is Ctrl-F9. The option you mentioned is what I call update. It just calculates everything below your highest change.

I've been experimenting with using the Ctrl-F9 function, and it's very useful for my situations, but I still have some cases where Mathcad won't complete it's calculations unless I use the plain '=' or in the case of some of my symbolic evaluations, the forward arrow sign on several of my intermediate calcs. In some cases, it even has to have the '=' used in the same code line as the ':=' that was used to define the function. I've trying retyping the code lines, using Ctrl-F9, and I've tried restarting the program. None of these seem to work. I can live with this problem, but I don't like it because it makes trouble shooting and debuggin other more legitimate problems more difficult. Does anyone have any further ideas?

Also, because I'm working at a university, it was easy for me to get access to Mathcad 15, where I was using 14 before. v14 and 15 are both giving me this problem.

Karl

RichardJ
19-Tanzanite
(To:ptc-3031221)

Without an example worksheet that shows the problem it's going to be very difficult to figure out what is happening. Can't you post a worksheet and the necessary Excel data?

Announcements

Top Tags