3D Plotting in Matlab

Given two vectors describing sequences of x and y values, e.g.
y=[-1: .01 : 1]
the command
constructs two length(x) by length(y) matrices.
The matrix X has the i'th value of vector x in its i'th column.
The matrix Y has the j'th value of vector y in its j'th row.
If the function f(x,y) is described in an m-file fcnname.m, then
will compute an appropriate array of function values so that
gives a wireframe graph of f
gives a graph with contours drawn in the xy plane.
gives a shaded surface representing this graph.

Last Update: September 25, 2000

[Mathlab Home | Math]