How do i convert from Complex numbers(a+bi) to a polar form(r,theta) ?
107 views (last 30 days)
Show older comments
I am writing a script for my microwave amplifier design . I need to convert from the polar form to complex numbers and vice versa . Does Matlab support this function ?
Thank you.
0 Comments
Answers (3)
Azzi Abdelmalek
on 25 Jan 2014
x=2+3j
rho=abs(x)
theta=angle(x)
%-------------------
x=rho*exp(j*theta)
1 Comment
Xuanjun Gong
on 30 Mar 2020
There is an error for using rho*exp(j*theta) about dimensionality.
It might solve the issue by using:
`x=rho.*exp(j*theta)`
Mischa Kim
on 25 Jan 2014
Edited: Mischa Kim
on 25 Jan 2014
Hello Pradeep, use http://www.mathworks.com/help/matlab/ref/cart2pol.html. You can also find the reverse transformation there.
a = 1 + 2i;
[theta, rho] = cart2pol(real(a), imag(a))
4 Comments
Felicia Chiew Pei Wan
on 10 Feb 2015
Edited: Felicia Chiew Pei Wan
on 10 Feb 2015

I can display the s-parameters in a+bi form. However, I would like to convert it to polar form with this kind of arrangements.
Arrangement (in polar form) S11 S21 (S11 AND S22 IN SAME LINE) S12 S22(S12 AND S22 IN NEXT LINE)
On the other hand, "[theta, rho] = cart2pol(real(a), imag(a))". Based on this command, the angle we got is not right. Have to multiple by 180/pi. Any idea on this? Thank you.
Youssef Sherif
on 1 Apr 2023
Io_polar = sprintf('Io_polar = %.3f ∠ %.3f°', abs(Is(1,1)), rad2deg(angle(Is(1,1))))
0 Comments
See Also
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!