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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

5-Regular Member

## Function that shows the equation that was used in a satisfied condition

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

9 REPLIES 9
23-Emerald II
(To:MS_9880453)

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

5-Regular Member
(To:StuartBruff)

hi, thanks for the reply, can you so me how to do it or can you give an example?

23-Emerald II
(To:MS_9880453)

@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

23-Emerald II
(To:StuartBruff)

And here's a follow up to my previous message showing a symbolic solution ...

23-Emerald III
(To:StuartBruff)

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".

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

23-Emerald II
(To:LucMeekes)

Thanks, Luc. I'd either forgotten and hadn't noticed (I don't play with units much.)

Cheers,

Stuart

23-Emerald II
(To:StuartBruff)

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).

21-Topaz I
(To:MS_9880453)

Hi,

23-Emerald III
(To:MS_9880453)