Matlab 版 (精华区)

发信人: zjliu (秋天的萝卜), 信区: Matlab
标  题: [转载]关税2
发信站: 哈工大紫丁香 (Thu Jun 12 21:17:19 2003)

figure;
subplot(221);
plot(1:10);
subplot(222);
x=0:0.1:(2*pi);
plot(x,sin(x))
title('sin wave'); xlabel('x');ylabel('y');
subplot(223);
sphere(15);
subplot(224)
cylinder([1 .5 1]);

figure_position=get(gcf,'position');
 rectangle_vector=[figure_position(3:4)/2 figure_position(3:4)/2];
subplot(222)
for loop=0:20
    plot(x,sin(x+2*pi*loop/21));
    title('sin wave');xlabel('x');ylabel('y');
    M(:,loop+1)=getframe(gcf,rectangle_vector);
end

pause(3)
figure
movie(M);

pause(3)
figure('pos',rectangle_vector);
movie(gcf,M,5);

练习:
   为何这里rectangle_vector这样设置?

--
╔═══════════════════╗
║★★★★★友谊第一  比赛第二★★★★★║
╚═══════════════════╝

※ 来源:.哈工大紫丁香 bbs.hit.edu.cn [FROM: 202.118.229.92]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:7.455毫秒