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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Mathcad Prime 3.1 symbolic challenge

DJF
16-Pearl
16-Pearl

Mathcad Prime 3.1 symbolic challenge

I'm trying to accomplish the following.  I want to symbolically show calculations along the way to enable basic troubleshooting.  Easy enough, but in the later equations I only want the prior results to be shown, while mathcad prime continues to plop in the whole equation even if it's been evaluated.  Here's my very simple sample.  I'd like to simplify the expression for Ptot by showing the previous results.  But I can't seem to get there easily.  File attached.  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
DJF
16-Pearl
16-Pearl
(To:Werner_E)

Yes, showing P1 and P2 also is my goal.  (the actual equations are far more complicated and I desire to have this visual check included for every equation.)  But with some tinkering I think I've found my solution that is more compact version of what you came up with. (but essentially the same thing)

It seems odd (almost wrong) to be redefining P1 but it seems to work and is quite compact.  I can live with this, so I think it's solved.  Thanks.  Now if they'd only let me control the number of decimal places in the symbolics....

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:DJF)

That's one of the difficult challenges with Mathcad, and Prime is no exception: To control the output of the symbolic processor.

(I'm limited to Prime Express = no symbolics)

Maybe it helps if you symbolically undefine A through D just before the definition of Ptot.

Success!
Luc

Werner_E
24-Ruby V
(To:DJF)

Maybe that way

Werner_E
24-Ruby V
(To:DJF)

If you need to show the calculation of P1 also via explicit, you must not use inline evaluation before.

Inline evaluation stops the backtracing of the symbolic explicit.

So can do something like the following:

DJF
16-Pearl
16-Pearl
(To:Werner_E)

Yes, showing P1 and P2 also is my goal.  (the actual equations are far more complicated and I desire to have this visual check included for every equation.)  But with some tinkering I think I've found my solution that is more compact version of what you came up with. (but essentially the same thing)

It seems odd (almost wrong) to be redefining P1 but it seems to work and is quite compact.  I can live with this, so I think it's solved.  Thanks.  Now if they'd only let me control the number of decimal places in the symbolics....

Werner_E
24-Ruby V
(To:DJF)

> It seems odd (almost wrong) to be redefining P1 but it seems to work

Its not the redefinitions which does the trick, its the numeric evaluation at the end which assign this numeric value to the variable at the left hand side and therefore the symbolics has no way to determine how this value was created.

> Now if they'd only let me control the number of decimal places in the symbolics....

There is the keyword "float" which controls the number of significant digits in symbolic calculations (not the number of decimals). The big drawback is, that "float" does not only affect the display of the results but it affects the whole calculation. So normally the advice is to avoid the use of "float". But in your case it might be useful and do no harm, if you simply show a result using explicit. This means you would have to avoid your nice P1:=P1 --explicit,ALL, float,6--> ... and must use the two expressions

P1:=P1  and then P1 --explicit,ALL, float,6--> ...

Its a pity we cannot hide the keywords and let the arrow look like a normal equal sign, as we can do in Mathcad (15 and below). It would look much nicer that way.

WE

Top Tags