[X1,Y1,Z1] = peaks(30);%曲面1
S1=size(Z1);%曲面1大小
C1=ones(S1);
[X2,Y2,Z2] = peaks(50);%曲面2
X3=X2;Y3=Y2+3;Z3=flipud(Z2+5);
S2=size(Z2);%曲面1大小
C2=2*ones(S2);
map=[1,0,0;0,1,0];%红,绿
surf(X1,Y1,Z1,C1),hold on
surf(X3,Y3,Z3,C2),colormap(map)
xlabel('X'),ylabel('Y')
% shading flat
alpha(0.7);
hold off