1、grid函数:
显示或隐藏轴网格线。
%% 无网格
x = linspace(0,10);
y = sin(x);
plot(x,y)
%% 有网格
x = linspace(0,10);
y = sin(x);
plot(x,y)
grid
%% 网格消失即无网格
x = linspace(0,10);
y = sin(x);
plot(x,y)
grid
grid
2、grid on 函数:
打开网格。
x = linspace(0,10);
y = sin(x);
plot(x,y)
grid on
3、grid off
关闭网格。
%%
[X,Y,Z] = peaks;
surf(X,Y,Z)
grid off