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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Extract Real parts from an equation??

ptc-4451268
7-Bedrock

Extract Real parts from an equation??

Hello,

I have attached my mathcad sheet (ver 14).

I have an equation, and I need to extract the real and imaginary parts. However, my equation is full of variables, and mathcad says "this variable is undefined". It is undefined because it isn't known, its just a variable. I don't know how to tell analytix that my variable is just a variable, it could be any number.

Anyway, I would LOVE LOVE LOVE if somebody could help me!

Thanks!

2 REPLIES 2
Werner_E
25-Diamond I
(To:ptc-4451268)

"variable is undefined" is an error mesaage from the numeric engine. All variables have to be defined, otherwise a numerical evaluation is not possible. The way to satisfay the numerics is either use the boolean "=" to make an equation (which you may solve symbolically for a distinc variable) or turn the assignment into a function, e.g. write U(R,I):=R*I instead of U:=R*I.

In your worksheet there is no equation, at least not at the and. The expression you have at the end could be separeted symbolically in real and imaginary part by using the Re(...) and Im(...) function, but Mathcad can't do that, as all of your variables could be complex numbers, too. Adding the modifyer "assume, ALL=real" or even better "assume,ALL>0" if thats appropriate would do the job, but not in case of your expression because of the square root of (x+yi). Guess you couldn't separate real and imaginary part by hand either.

ReIm.png

Werner_E
25-Diamond I
(To:Werner_E)

Addendum:

With a little manual calculation to split the square root of a generic complex number in real an imaginary part (Mathcad is not of any help here) you get the desired values.

Look at the attached file if its what you want

real2.png

Announcements

Top Tags