This MATLAB function draws a contour plot of matrix Z, where Z is interpreted as heights with respect to the x-y plane.
www.mathworks.com