Skip to main content
1-Visitor
January 12, 2023
Question

translating equation to mathcad prime

  • January 12, 2023
  • 2 replies
  • 872 views

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

25-Diamond I
January 12, 2023

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

 

 

 

 

 

23-Emerald IV
January 12, 2023

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