|
Contents | Previous | Next | Subchapters |
| Syntax |
contour(z) |
contour(z, v) | |
contour(x, y, z) | |
contour(x, y, z, v) | |
| See Also | contour , mlmode_mesh |
contour(z)
Make a simple contour plot in the current
viewport
with row index corresponding to
the y axis and
column index corresponding to the x axis.
(For a detailed description see contour(matrix)
where matrix is equal to the transpose of z.)
contour(z, v)
If v is a scalar, it specifies the number of contour
levels. In this cases the levels are evenly spaced between the minimum
and maximum value in z.
It v is not a scalar,
it is an integer, real, or double-precision
vector. It length specifies the number of contour levels and its elements
specify the z value for the corresponding contour level.
(For a detailed description see contour(matrix, levels)
where matrix is equal to z' and levels
is the value for each of the contour levels.)
contour(x, y, z)
Same as contour(z) except that
the integer, real or double-precision vectors x
and y specify the axis x and y
axis values.
To be specific, the row index value
i corresponds to y(i) on the y axis,
and the column index value
j corresponds to x(j) on the x axis.
x = 1 : 8;
y = 1 : 8;
z = y' * x;
num2str(z)
O-Matrix will reply
1 2 3 4 5 6 7 8
2 4 6 8 10 12 14 16
3 6 9 12 15 18 21 24
4 8 12 16 20 24 28 32
5 10 15 20 25 30 35 40
6 12 18 24 30 36 42 48
7 14 21 28 35 42 49 56
8 16 24 32 40 48 56 64
If you continue by entering
omginit
contour(z)
O-Matrix will draw the following plot