Matlab绘制简单的三维动画
三维动画代码,挺有意思clear;clc;
close all;
z=0:pi/50:10*pi;
x=sin(z);
y=cos(z);
figure;
for k = 1:length(z)
clf;
xlabel('x');ylabel('y');zlabel('z');
axis([-1 1 -1 1 0 40]);hold on;
plot3(x(1:k),y(1:k),z(1:k),'color','b');
plot3(x(k),y(k),z(k),'r.', 'markersize', 20);
hold off;
im = frame2im(getframe(gcf));
= rgb2ind(im,20);
if (k==1)
imwrite(I,map,'MyGif.gif','gif','Loopcount',inf,'DelayTime',0.01);
else
imwrite(I,map,'MyGif.gif','gif','WriteMode','append','DelayTime',0.01);
end
end {:1_561:} 顶你一下 有Matlab 32位的软件下载链接吗?可以用的
页:
[1]