MATLAB: How to plot 2 surf plots in the same figure

plotting

so I have 2 surf plots Z1 and Z2. I can plot both separately using
surf(X,Y,Z1) and
surf(X,Y,Z2)
but how do I plot them together on the same plot?

Best Answer

Use the hold (link) function.
figure(1)
surf(X,Y,Z1)
hold on
surf(X,Y,Z2)
hold off
grid on
Related Question