2-8.m

来自「文件是学习matlab过程中关于图形图像处理的源程序」· M 代码 · 共 26 行

M
26
字号
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 + =
减小字号Ctrl + -
显示快捷键?