Two output function issue
7 ビュー (過去 30 日間)
古いコメントを表示
This function is supposed to display the radius and the angle when you input the coordinates and it's only displaying the radius can someone help me out ?
Thanks in advance
function[r,d]=Cartapol(x,y)
r=sqrt((x^2)+(y^2));
d=atand(y/x);
if(x<0)
d=180+d;
elseif (x>0 && y<0)
d=360+d;
elseif x==0 && y==0
d=0;
elseif x==0 && y<0
d=270;
end
4 件のコメント
Stephen23
2019 年 2 月 8 日
@Patirick Legare: basic MATLAB concepts, such as how to call functions with multiple outputs, are explained in the introductory tutorials:
Highly recommended.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!