How to extract real and imag part from symbolic expression
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have the following symbolic expression:
a=((6*pi*a0)/(6*pi-j*(kn^3*a0)));
ap=a/(1-a/(16*pi*R^3)*((eps_s-eps_w)/(eps_s+eps_w)));
all parametrs are difined as a real.
when I type real(ap) or imag(ap) it can not extract these parts. What could be the solution of this problem?
Thx
3 comentarios
Walter Roberson
el 28 de Oct. de 2019
You are right, MATLAB has difficulty finding those components.
Respuestas (1)
Walter Roberson
el 28 de Oct. de 2019
simplify( expand( real(ap) ) )
simplify( expand( imag(ap) ) )
2 comentarios
Walter Roberson
el 28 de Oct. de 2019
What do you mean by "it still does not work properly" ?
I did not check every term, but the results look to be the same as what I obtained using Maple .
There does not appear to be any simple form for the expressions.
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!