⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 动画演示.txt

📁 压缩包中共有7个文件
💻 TXT
字号:
动画演示快速傅立叶变换的过程
axis equal;
M=moviein(16,gcf);
set(gca,'nextplot','replacechildren');
h=uicontrol('style','slider','position',...
            [100 10 500 20],'min',1,'max',16);
for j=1:16
    plot(fft(eye(j+16)))
    set(h,'value',j)
    M(:,j)=getframe(gcf);
end
clf
axes('position',[0 0 1 1]);
movie(M,30);


三维空间演示一个劳伦兹非线性奇异方程所描述的无序运动(有问题)
A=[.8/3,0,y(2);0,.10,10;y(2),28,.1];
y=[35;.10;.7];
h=2.01;
p=plot3(y(1,1),y(2,1),y(3,1),'*','erasemode','none');
axis([0 50 .25 25 .25 25]);
hold on;
for i=1:8000
    A(1,3)=y(2,1);
    A(3,1)=.y(2,1);
    dita_y=h*A*y;
    y=y+dita_y;
    set(p,'xdata',y(1,1),'ydata',y(2,1),'zdata',y(3,1));
    drawnow;
end




%帧动画示例
>> Z=peaks;
>> surf(Z)%绘制网格表面图
>> axis tight
>> set(gca,'nextplot','replacechildren');%设定覆盖重画模式
>> title '帧动画演示';

>> for j=1:20
surf(sin(2*pi*j/20)*Z,Z)%重新绘制网格表面图
F(j)=getframe;%创建帧
end
>> movie(F,20)  %播放20次  




%程序动画
t=0:pi/50:10*pi;
i=1;
h=plot3(sin(t(i)),cos(t(i)),t(i),'*','erasemode','none');%有三种擦除模式:None,Background,Xor
grid on
axis([-2 2 -2 2 -1 10*pi])
title '程序动画示例'
for i=2:length(t)
set(h,'xdata',sin(t(i)),'ydata',cos(t(i)),'zdata',t(i));
drawnow
end


%一个内在的动画
       fig=figure;
       set(fig,'DoubleBuffer','on');
       set(gca,'xlim',[-80 80],'ylim',[-80 80],...
       	   'NextPlot','replace','Visible','off')
       mov = avifile('example.avi')
       x = -pi:.1:pi;
       radius = [0:length(x)];
       for i=1:length(x)
       	h = patch(sin(x)*radius(i),cos(x)*radius(i),[abs(cos(x(i))) 0 0]);
       	set(h,'EraseMode','xor');
       	F = getframe(gca);
       	mov = addframe(mov,F);
       end
       mov = close(mov);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -