?? movieexample.m
字號:
% movie making example: rotate a 3-D surface plot
[X,Y,Z]=peaks(50); % create data
surfl(X,Y,Z) % plot surface with lighting
axis([-3 3 -3 3 -10 10]) % fix axes so that scaling does not change
axis vis3d off % fix axes for 3D and turn off axes ticks etc.
shading interp % make it pretty with interpolated shading
colormap(copper) % choose a good colormap for lighting
for i=1:15 % rotate and capture each frame
view(-37.5+15*(i-1),30) % change the viewpoint for this frame
m(i)=getframe; % add this figure to the frame structure
end
cla % clear axis for movie
movie(m) % play the movie
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -