[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
C = X.*Y;
surf(X,Y,Z,C)
colorbar
x
[X,Y,Z] = peaks(30);
figure
surfc(X,Y,Z)
x
surface 是一个创建曲面图形对象的低级函数。曲面是将每个元素的行和列索引用作 x 和 y 坐标、将每个元素的值用作 z 坐标而创建的矩阵数据图。
[XD,YD,ZD] = peaks(25);
load clown
C = flipud(X);
figure
surface(XD,YD,ZD,C,...
'FaceColor','texturemap',...
'EdgeColor','none',...
'CDataMapping','direct')
colormap(map)
view(-35,45)
xx
surfl 函数