MATLAB: How to plot a constant Z value with varying X and Y

surface

I want to plot a value of Z=3 for X=1:50 and Y=1:50 so that I can get a plane surface plot. Any suggestions please?

Best Answer

[X,Y] = meshgrid(1:50,1:50);
Z=3*ones(length(Y),length(X));
surf(X,Y,Z);
Best wishes
Torsten.
Related Question