How to convert from polar to complex

119 次查看(过去 30 天)
How can I convert such as 5 at an angle of 120 to a complex number ( a+-bi)

采纳的回答

madhan ravi
madhan ravi 2018-11-11
编辑:madhan ravi 2018-11-11
5*exp(deg2rad(120)*i) %which is in eulers form r*e^(theta*i)
5 - radius
120 degrees converted to radians
  2 个评论
Sultan Khoja
Sultan Khoja 2018-11-11
I had done the traditional way of converting. the same way of yours a= 5*exp(i*120*pi/180); your code is more professional because you used the in-built function deg2rad.. thanks

请先登录,再进行评论。

更多回答(1 个)

Dr. C V Chandrashekara
thnak you

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by