Plot 3D on Vertical Planes in Matlab

t = 0 : pi/50 : 10*pi;
subplot(1,3,1)
plot3(sin(t),cos(t),t);hold on
grid on
axis square
z = ones(length(t),1);
subplot(1,3,2)
% Plot x-y plane
plot3(sin(t),cos(t),z*0,'k');hold on
% Plot x-z plane
plot3(z,cos(t),t,'g')
% Plot y-z plane
plot3(sin(t),z,t,'r')
grid on
axis square
subplot(1,3,3)
plot3(sin(t),cos(t),t);hold on
grid on
% Plot x-y plane
plot3(sin(t),cos(t),z*0,'k');hold on
% Plot x-z plane
plot3(z,cos(t),t,'g')
% Plot y-z plane
plot3(sin(t),z,t,'r')
axis square


No comments:

Post a Comment