surf
Surface plot of a function of two variable.
surf(z)
surf(x,y,z)
Inputs
z An mXn matrix of the function values to plot.
x Either a vector of length n or a matrix of size mXn .
y Either a vector of length m or a matrix of size mXn .


Description
The inputs x and y should either be both vectors, or matrices of the indicated size. In the former case, the function is assumed to be of the form z[i,j]=f(x[j], y[i]) . Otherwise, the functional form z[i,j]=f(x[i,j],y[i,j]) is assumed.

Each region defined by x[i,j]<=x<=x[i,j+1], y[i,j]<=y<=y[i+1,j] is filled with the same color, which is determined by the average z value in this region. Further, the boundaries of of each of these regions are drawn in black.
Example
>>x=[0:.02:1]'
>>y=x
>>z=sin(x*pi)*cos(2*x'*pi)
>>surf(x,y,z)
>>title('Surface Plot')