Skip to main content
15-Moonstone
June 21, 2019
Solved

Separation of the complex values into the real and imaginary

  • June 21, 2019
  • 2 replies
  • 1749 views

Hello!

 

Is it, in general, possible to separate a complex value into a real and imaginary parts in Mathcad?

If it possible, how can we do so?

Lets say that I have a complex root "r=0.2+3i". I want to assign the real value of this root as a=0.2 and imaginary as b=3i. Do you have any suggestions?

 

Best regards,

Sergey

 

 

 

Best answer by Werner_E

If, lets say, z is the variable name, you may use the funtions Re(z) and Im(z) to get real and imaginary part of z.

In case of your example you would write

 

a:=Re(r)

b:=Im(r)

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
June 21, 2019

If, lets say, z is the variable name, you may use the funtions Re(z) and Im(z) to get real and imaginary part of z.

In case of your example you would write

 

a:=Re(r)

b:=Im(r)

Sergey15-MoonstoneAuthor
15-Moonstone
June 21, 2019

Thanks a lot.

It is worked just fine!

 

Sergey

24-Ruby IV
June 21, 2019

 

cn.png