Info
此问题已关闭。 请重新打开它进行编辑或回答。
help with homework for cs101, topolar?
2 次查看(过去 30 天)
显示 更早的评论
Write a function topolar that accepts a complex number c, and returns two output arguments containing the magnitude mag and angle theta of the complex number. The output angle should be in degrees. The error message must be displayed when the number of input parameters is not equal to one. (a) Show the Matlab function. (b) Test the function by using: [a b]=topolar(3+i*4).
1 个评论
回答(1 个)
Star Strider
2014-12-6
The magnitude and angle (degrees) are easy enough:
abs(c);
atan2d(imag(c),real(c))
respectively.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!