Hi,
I'm not sure if my subject is correct. But I'm looking for function to show the formula or equation that was used in a variable especially if there are conditions that was used in the said variable. see example below. Variable Leh has 2 formulas that was conditioned based on the value of variable nv. if the first condition was satisfied, i want to display the formula instead of the result of the formula. Thank you
Probably your best bet is to return the expression as a string, if you can put up with the lack of subscription (and can tolerate, say, using a period (".") to indicate start of subscripts).
You may be able to play around with the symbolic processor (SP) to get the result you want, but invoking the symbolic processor both slows things down and may lead to undesirable side effects.
Stuart
hi, thanks for the reply, can you so me how to do it or can you give an example?
@MS_9880453 wrote:
hi, thanks for the reply, can you so me how to do it or can you give an example?
Terry's given you a Mathcad 15 example of returning the formula as a string. Here's a Mathcad Prime 7 example using the symbolic processor. I haven't got M15, but I *think* it should work in M15 if you use different Math Styles for the "formula" and "working" expression.
Stuart
And here's a follow up to my previous message showing a symbolic solution ...
Stuart,
there is a setting in Prime to make the Symbolic processor aware of units. It's a 'calculation option', you can set "Units/Constants in Symbolics".
The online help explains:
and more...
But the example with m+m above isn't very convincing to me... Pre mathcad15 does:
For two different 'math styles', the first is a variable, the second is a unit (UserX style).
And of course:
Success!
Luc
Thanks, Luc. I'd either forgotten and hadn't noticed (I don't play with units much.)
Cheers,
Stuart
And the worksheet (now updated with Luc's information) that I didn't attach before (*).
Stuart
(*) I've got the Mathcad Prime 7 trial running on a laptop with only 8 GiB RAM and an HDD, and it runs slower than a stunned snail if I open a browser as well as Mathcad ... it's only marginally faster if Prime is the only thing open!
I'm reliant upon OneDrive to act as my repository and as the bridge between my Windows laptop and my MacBook (which I run the browser on). OneDrive can be a bit tardy syncing between the two devices, so the worksheet wasn't available at the time I posted the images (courtesy of Evernote's screen capture facility and Evernote's quick syncing).
How about:
Success!
Luc