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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

translating equation to mathcad prime

LT_10472615
2-Explorer

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 2
Werner_E
25-Diamond I
(To:LT_10472615)

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

 

 

 

 

 

LucMeekes
23-Emerald III
(To:LT_10472615)

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

Announcements

Top Tags