📄 6-7.m
字号:
t = 0:pi/20:2*pi;
[x,y] = meshgrid(t);
subplot(2,2,1)
z = sin(x)+cos(y);
plot(t,z)
grid on
%打开网格线
subplot(2,2,2)
plot(t,z)
axis([0 2*pi -2 2])
hold on
%在当前图形上绘制数据
plot(t,sin(x).*cos(y))
hold off
%关闭
subplot(2,2,3)
plot(t,z)
axis ij
%矩阵式坐标,原点在左上方
axis off
%关闭坐标轴
subplot(2,2,4)
plot(t,z)
set(gca,'Xtick',0:.5:6,'Ytick',-2.5:0.5:2.5)
%设定坐标轴的刻度
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -