Matlab 版 (精华区)

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

x=0:50;
y=sin(.05*x+cos(x*.1));
 figure_handle=figure('backingstore','off');
axes('drawmode','fast','box','on');
axis([min(x) max(x) min(y) max(y)]);
line_handle=line(x(1:2),y(1:2));
set(line_handle,'linewidth',2,'erasemode','none');
for index_counter=2:length(x);
    set(line_handle,...
        'xdata',[x(index_counter+[0 -1])],...
        'ydata',[y(index_counter+[0 -1])]);
    pause(.5)
    drawnow
end
line(x,y,'linewidth',2);
refresh
[imagematrix,map]=getframe(figure_handle);
newfig=figure;
figpos=get(newfig,'position');
set(newfig,'position',...
    [figpos(1:2) fliplr(size(imagematrix))]);
axes('units','normalized','position',[0 0 1 1]);
image(imagematrix);
colormap(map);
set(gca,'visible','off');

练习:
  99不忘,依18舍

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

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