Skip to main content
1-Visitor
December 20, 2021
Solved

Unable to evaluate a conditional expression (Prime 6)

  • December 20, 2021
  • 3 replies
  • 6738 views

 Hi,

I'm working on a quite big automation tool.

I've come to a point where I'm making a function in one variable out of simple conditional statements with functions in more variables.

When I try to let Mathcad show me it's symbolic answer, it gives me an error:
"Unable to evaluate a conditional expression"

I checked above that this is not the case.

How can I solve this?

SL_7995759_0-1640010761592.pngSL_7995759_1-1640010776500.png

Thanks in advance!
Arne

Best answer by SL_7995759

Hi LucMeekes,

thanks for your time! Don't ask me why, but I managed to get a solution by redefining the conditional statements to a variable:

SL_7995759_1-1640013216207.png

 

3 replies

23-Emerald IV
December 20, 2021

Symbolic evaluation of programs is not supported in Prime, I guess.

 

Where did you "check above", I see only ONE symbolic evaluation on your sheet.

 

Success!
Luc

              

1-Visitor
December 20, 2021

Any idea if writing the full statements out can do the trick?

SL_7995759_0-1640011909775.png

I see that in my file I get a 1 or 0 if a statement is or is not true. But when I try to use it in a formula, it doesn't give me 1 or 0 but the statement itself.

If I get a workaround like this, my problem is "solved" yet very timeconsuming for a lot of conditional and nested conditional functions.

 

23-Emerald IV
December 20, 2021

In Mathcad (not Prime), the following works:

LucMeekes_0-1640012210892.png

Guess you were looking for something like that...

 

Success!
Luc

SL_79957591-VisitorAuthorAnswer
1-Visitor
December 20, 2021

Hi LucMeekes,

thanks for your time! Don't ask me why, but I managed to get a solution by redefining the conditional statements to a variable:

SL_7995759_1-1640013216207.png

 

23-Emerald IV
December 20, 2021

Would it also work if you supply e.a as a parameter to the M.1 function (like I did)?

 

Did you notice that in your symbolic results, the kN and m are no longer units...?

There is a setting in Prime to have its symbolics be aware of units.

 

Success!
Luc

21-Topaz II
December 21, 2021

Hi,

I know this post has been answered but it is similar to a post earlier in the month dealing with loads on a beam.

Would be a shame if you are not made aware of the earlier post.

For uniform load on the whole span set w1 equal to w2, A to zero and B equal to L.

 

The enclosed file is Prime 7, can someone backdate it to Prime 6.

Have enclosed a PDF so if all else fails it can be created again in Prime 6.

 

Cheers

Terry

Capture.JPG

23-Emerald IV
December 21, 2021
23-Emerald IV
December 26, 2021

Apparently the plot on the sheet doesn't 'plot'. See here for a solution:

https://community.ptc.com/t5/PTC-Mathcad/Mathcad-Prime-Integrals-Are-Too-Slow/m-p/762776#M198690

 

Luc