real and imaginary part of complex number
46 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Niclas
el 15 de Jul. de 2019
Comentada: Torsten
el 16 de Jul. de 2019
Hi,
I'm trying to get the real and imaginary part of a formular in a limited range of a parameter n.
how do I add in my formular
syms n real
imag (1i^n)
that 0 < n < 1 ?
Thanks a lot!
10 comentarios
Torsten
el 15 de Jul. de 2019
r is real - it is the length of the vector from the origin to z.
Thus
real(r^n) = r^n, imag(r^n) = 0.
Respuesta aceptada
Walter Roberson
el 16 de Jul. de 2019
V = complex(randi([-10 10],1), randi([-10 10])); %some data to work on
syms n real
Vn = V^(1/n);
RV = rewrite( real(Vn), 'exp');
IV = rewrite( imag(Vn), 'exp');
6 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!