How to reolve this error? Matrix dimensions should agree..!
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
James Tursa
am 28 Okt. 2016
Bearbeitet: James Tursa
am 28 Okt. 2016
Use element-wise operator ./ instead of the matrix operator /
r1=3./cos(theta);
r2=-4./sin(theta);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!