How to determine the absolute value of a complex exponential function containing a symbolic variable?

I am determining the frequency response of a parallel RLC circuit. The input current is 10*sin(w*t). The phasor form is, I = 10 exp(j*w*t). The abs(I) is 10. But matlab gives 10*exp(-imag(t*w)). But whatever the value of w*t, the absolute value is always 10. How can I get magnitude from such complex exponential, without substituting the value of w and t?

Respuestas (1)

syms omega t real
syms I0 positive
I = I0*exp(1i*omega*t);
abs(I)
ans = 

3 comentarios

Thanks.
I was getting 10*exp(-imag(t*w)); is that because I defined w and t as complex variable?
Yes, if you don't restrict variables to e.g. being integer or real, they are assumed as complex by default.

Iniciar sesión para comentar.

Categorías

Más información sobre Dynamic System Models en Centro de ayuda y File Exchange.

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 3 de Dic. de 2022

Comentada:

el 12 de Dic. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by