Symbolic complex number manipulation

5 vues (au cours des 30 derniers jours)
squared
squared le 7 Mar 2018
Is there a way to put a fraction of complex number in standard form with the symbolics toolbox? After getting it in standard form simplify to then extract the imaginary part? And lastly, setting the imaginary part equal to zero and solving for a variable?
for example:
Z=(A+1i*B)/(C+1i*D)
%%should give the following in closer to standard form, not done automatically
Z2=(A+B*1j)*(C-D*1j)/(C^2+D^2)
%%trying to simplify
Z3=collect(Z2,1i)
%%this command should give the imaginary part, but just marks in the equation imaginary and real.
Z3imag=imag(Z3)

Réponses (1)

Walter Roberson
Walter Roberson le 7 Mar 2018
syms A B C D real
and then do your steps. This gives (B*C - A*D)/(C^2 + D^2) as the result.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by