Unequal vector lengths in 3D plot function

5 views (last 30 days)
Sindhuja
Sindhuja on 15 Apr 2013
Hi! My plot statements are as follows:-
rtheta=1:1:180;
rpsi=1:1:360;
figure(1)
plot3(ftot,rtheta,rpsi);
figure(2)
plot3(ftot,rtheta,rpsi);
i get the error-"Vectors must be the same lengths". Can someone please advice me on how to eliminate this error? I want the ranges on theta and psi to remain the same though.

Answers (1)

Matt J
Matt J on 15 Apr 2013
Edited: Matt J on 15 Apr 2013
You eliminate the error by correcting what MATLAB told you is wrong. Redefine rtheta, rpsi and ftot to have the same number of points.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!