📄 代码12-8.txt
字号:
r = subplot(2,1,1)
Z = peaks; surf(Z);
axis tight % 设置轴的范围为数据范围。
set(gca,'nextplot','replacechildren');
s = subplot(2,1,2)
Z = peaks; surf(Z); % 使用peaks函数生成数据,surf生成三维表面
axis tight % 设置轴的范围为数据范围。
set(gca,'nextplot','replacechildren');
% 录制电影
for j = 1:20
axes(r)
surf(sin(2*pi*j/20)*Z,Z)
axes(s)
surf(sin(2*pi*(j+5)/20)*Z,Z)
F(j) = getframe(gcf);
pause(.0333)
end
% 播放电影;注意它与图形框匹配不佳:
h2 = figure;
movie(F,10)
% 使用图形句柄使帧画面与图形窗口匹配:
movie(h2,F,10)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -