Get one equation from two complex roots
Afficher commentaires plus anciens
Hi, I would like to ask if it is possible to get a single equation from this expression (s-(-9+j*3))*(s-(-9-j*3)).
I tried to use syms s (to declare s as a variable) but I only get a simplified form of this expression which is (s+9-j*3))(s+9+j*3)) as the answer.
I calculated by hand that the equation in the end should be s^2+18*s+90.
Thank you.
Réponses (2)
syms s
eqn = (s-(-9+1i*3))*(s-(-9-1i*3)) ;
simplify(eqn)
You can use
help sym/expand
to force MATLAB to expand an expression that contains parens.
syms s
expand((s-(-9+i*3))*(s-(-9-i*3)))
Catégories
En savoir plus sur Calculus dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!