?? diamond.m
字號:
function diamond()
%實現點沿圓周運動的動畫
t=0:pi/2000:pi*2;
x=sin(t);
y=cos(t);
plot(y,x,'b');
axis equal
n=length(t);
h=line('color','g','linestyle','.',...
'marker','.','markersize',50,'erasemode','xor');
i=1;
while i
set(h,'xdata',y(i),'ydata',x(i));
drawnow;
i=i+1;
if i>n
i=1;
end
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -