1、% 视觉错觉图-% copyright 2007-2011 $author: baby_wolf $% $25-Dec-2011 00:25:14$%clear allclose allhfig=figure(menu,none,pos,200 200 800 300,color,k) ;hold on axis(0 1 -2 2);axis off% 标 注text(0.01,1.1,赵鸿平,color,0.5 0.06 0.9,fontsize,8);% 点 图t=0:1/480:479/480;y=sin(30*2*pi*t).*sin(2*pi*t);hplot=plot(t,y,g.
2、,markersize,3);% 设置 gif 图片帧数等numFrames=30;frames = struct(cdata, , colormap, );frames(numFrames) = frames;% 循环绘制各帧k=0;while k0TMP=TMP(:,end-n:end 1:end-n-1);elseTMP=TMP(:,-n+1:end 1:-n);endind=(i-1)*block_size+1;I(ind:ind+block_size-1,:)=TMP;endI(block_size:block_size:end,:)=0.3;imshow(I)colormap summer