How to reolve this error? Matrix dimensions should agree..!
2 ビュー (過去 30 日間)
古いコメントを表示
theta=0:0.01:2*pi;
r1=3/cos(theta);//getting error here "Error using / Matrix dimensions must agree"
r2=-4/sin(theta);//getting error here "Error using / Matrix dimensions must agree"
polarplot(theta,r1);hold on;
polarplot(theta,r2);
0 件のコメント
回答 (1 件)
James Tursa
2016 年 10 月 28 日
編集済み: James Tursa
2016 年 10 月 28 日
Use element-wise operator ./ instead of the matrix operator /
r1=3./cos(theta);
r2=-4./sin(theta);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!