contourc
低级等高线图computation
Syntax
C = contourc(Z)
C = contourc(Z,n)
C = contourc(Z,v)
C = contourc(x,y,Z)
C = contourc(x,y,Z,n)
C = contourc(x,y,Z,v)
Description
contourc
calculates the contour matrixC
used bycontour
,contour3
, andcontourf
. The values inZ
determine the heights of the contour lines with respect to a plane. The contour calculations use a regularly spaced grid determined by the dimensions ofZ
.
C = contourc(Z)
computes the contour matrix from data in matrixZ
, whereZ
must be at least a 2-by-2 matrix. The contours are isolines in the units ofZ
. The number of contour lines and the corresponding values of the contour lines are chosen automatically.
C = contourc(Z,n)
computes contours of matrixZ
withn
contour levels.
C = contourc(Z,v)
computes contours of matrixZ
with contour lines at the values specified in vectorv
. The length ofv
determines the number of contour levels. To compute a single contour of levelk
, usecontourc(Z,[k k])
.
C = contourc(x,y,Z)
,C = contourc(x,y,Z,n)
, andC = contourc(x,y,Z,v)
compute contours ofZ
using vectorsx
andy
to determine thexandyvalues.x
andy
must be monotonically increasing.
Tips
For more information on the contour matrix, see theContourMatrix
property for contour objects.
Specifying irregularly spacedx
andy
vectors is not the same as contouring irregularly spaced data. Ifx
ory
is irregularly spaced,contourc
calculates contours using a regularly spaced contour grid, then transforms the data tox
ory
.