Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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!
"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.
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