real and imaginary part of complex number
49 次查看(过去 30 天)
显示 更早的评论
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 个评论
Torsten
2019-7-15
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.
采纳的回答
Walter Roberson
2019-7-16
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!