Simplifying Complex expressions in Matlab Symbolic Toolbox

3 views (last 30 days)
Is there any way of finding the real and imaginary part of an expression using a method similar to this one ?
syms x y xv yv T
z = complex(x, y);
zv = complex(xv,yv);
z_conj = complex(xv,-yv);
f(z) = (-T/(2*pi))*1i*log((z^2-zv^2)*(z^2-z_conj^2));
xv, yv and T are parameters.
  2 Comments
JXT119
JXT119 on 15 Apr 2022
No, I want to obtain a simplified expression of the form f(z) = g(x,y,xv,yv,T) + iH(x,y,xv,yv,T)

Sign in to comment.

Answers (1)

Steven Lord
Steven Lord on 14 Apr 2022
Did you mean to assume that x, y, xv, yv, and/or T are real?
syms x1 y1 real
syms x2 y2
z1 = x1 + 1i*y1
z1 = 
z2 = x2 + 1i*y2
z2 = 
z1c = real(z1)
z1c = 
z2c = real(z2)
z2c = 
  1 Comment
JXT119
JXT119 on 15 Apr 2022
Yes, but I want to obtain a simplified expression of the form f(z) = g(x,y,xv,yv,T) + iH(x,y,xv,yv,T), but I do not know if Matlab Symbolic Toolbox is able to do so.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!