Skip to main content
1-Visitor
Jan 12, 2023 9:13 AM UTC
Question

translating equation to mathcad prime

Hello, can anyone help me write this in mathcad prime? Can't seem to place "otherwise" in my equation

 

LT_10472615_0-1673514763614.png

 

 

2 replies

Werner_E
25-Diamond I
Jan 12, 2023 9:45 AM UTC

Use an "else" instead of "otherwise".

It would look like this:

Werner_E_0-1673517167032.png

Some remarks:

  • You may omit Xi and use the calculated expression directly in the comparison
  • function argument etao is neverused, so it could be omitted
  • the assignment to a local(!) variable p in the last line is not necessary and useless

So it could also be written as

Werner_E_1-1673517324891.png

And if you like you may also use the if-function instead

Werner_E_2-1673517350125.png

And because program execution exits after a "return" statement, you may also write

Werner_E_0-1673523823352.png

 

 

 

 

 

Translate
23-Emerald V
Jan 12, 2023 6:44 PM UTC

One more option:

If you have the (original) mathcad ( .mcd or .xmcd) file that contains the function, then use Prime's built in converter to translate it to Prime.

 

Success!
Luc

Translate