Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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?
Thanks in advance!
Arne
Solved! Go to Solution.
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:
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
Any idea if writing the full statements out can do the trick?
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.
With "check above" I meant that I checked if "the bigger and smaller than"-statements don't return an error outside of the function program
In Mathcad (not Prime), the following works:
Guess you were looking for something like that...
Success!
Luc
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:
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
Doesn't seem to work unfortunately.
As for the units, Prime does seem to identify the units correctly when values for x get inserted or the graph gets plotted:
@SL_7995759 wrote:
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.
It worked because the numerical evaluation of a and b updated the values of a and b as perceived by the symbolic processor. It would appear that, even with Units/Constants in Symbolics turned on, the symbolic processor doesn't handle comparisons involving units.
Using SIUnitsOf doesn't help, either.
But enabling those numerically evaluated assignments gets rid of the problem.
I can't find much in the online Mathcad Help about the effects of in-line evaluation.
And even this doesn't (IMO) give a clear picture of what's happening. It looks like Mathcad evaluates the rhs first (if it legally can) and then assigns the result to the variable rather than assigning the expression to the variable and then evaluating it.
Stuart
Sometimes telling the symbolics a little bit more about the units using "assume" helps, but sometimes it doesn't:
But of course its the very same like numerically inline evaluating xy. xy is assigned 1 that way and the symbolics don't go any further back into the definitions of x and y.
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
Here you go.
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