Function to evaluate arguments using pol2cart
4 次查看(过去 30 天)
显示 更早的评论
Write a function with input arguments to be the magnitude and angle (in degrees) of a complex number and output argument to be the Cartesian form of the same number, i.e. x+yi.
0 个评论
回答(2 个)
Roger Stafford
2014-3-29
Think about how the real and imaginary parts of any complex number are related to its magnitude and angle, and you will have just about solved your problem. The necessary matlab code is easy to write.
Marta Salas
2014-3-30
编辑:Marta Salas
2014-3-30
As arguments for your function you have to write the name of the variable:
function x = Carlos_Virguez_Ex14(r,angle)
Note: you have to modify the code inside your function to use these variables.
then when you call that function [in the MATLAB's prompt] you assign the values for those variables:
>>Carlos_Virguez_Ex14(5,63)
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Detection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!