||Department of Engineering
Next: Plotting experimental data
There are many 3D options too, but again you still need to calculate all
x=linspace(-1, 1, 10);
y=linspace(-1, 1, 10);
The meshgrid command creates 2 2D matrices, each with as many
elements as there are grid-points. The X matrix has the x coordinates and
the Y matrix the y coordinates. Then the z coordinate
is calculated for each point and put in a Z matrix. Instead
of mesh, surf could be used to display a facetted surface.
Then the following can be done to add graduated colour and a key.