Now, let's make surfaces using the function plot3d(.).
This function is called like this: plot3d(x, y, z);
Where x and y are vectors and z is a matrix.
Look the example:
-->d = -3:3;
-->[x y] = meshgrid(d)
y =
- 3. - 3. - 3. - 3. - 3. - 3. - 3.
- 2. - 2. - 2. - 2. - 2. - 2. - 2.
- 1. - 1. - 1. - 1. - 1. - 1. - 1.
0. 0. 0. 0. 0. 0. 0.
1. 1. 1. 1. 1. 1. 1.
2. 2. 2. 2. 2. 2. 2.
3. 3. 3. 3. 3. 3. 3.
x =
- 3. - 2. - 1. 0. 1. 2. 3.
- 3. - 2. - 1. 0. 1. 2. 3.
- 3. - 2. - 1. 0. 1. 2. 3.
- 3. - 2. - 1. 0. 1. 2. 3.
- 3. - 2. - 1. 0. 1. 2. 3.
- 3. - 2. - 1. 0. 1. 2. 3.
- 3. - 2. - 1. 0. 1. 2. 3.
-->z = 9 - (x.^2 + y.^2);
-->plot3d(d, d, z);
The result is showed:

The coordinates x and y were the vector d (-3:3).
We can make any surface, so let's think in other surface. Look the next example:
-->x = -5:0.1:5;
-->y = 0:0.1:10;
-->[xc yc] = meshgrid(x, y);
-->w = %pi/4;
-->b = -0.5;
-->z = exp(b*yc).*sin(w*xc);
-->plot3d(x, y, z);
The result:

Try to make tests and generate surfaces.



