Skip to main content
1-Visitor
June 12, 2019
Solved

Reverse Variable values depending on third factor

  • June 12, 2019
  • 2 replies
  • 1459 views

Hello,

 

I am new to Mathcad. I am using MATHCAD 5.0.0.0. I am trying to define a very simple function described below. Any help will be really appreciated.

 

Say x=2, y=3

 

if z=4

x=x and y=y

else 

x=y and y=x

 

I tried defining a third variable. But was not able to do it inside if statement.

 

Thanks

Best answer by terryhendicott

Hi

Capture.PNG

2 replies

21-Topaz II
June 12, 2019
23-Emerald IV
June 12, 2019

Something like the attached...?

 

Success!
Luc