12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

contourcPurpose2contourcLow-level contour plot computationSyntaxDescriptionC = 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)contourc calculates the contour matrix C used by contour, contour3, andcontourf. The values in Z determine the heights of the contour lines withrespect to a plane. The contour calculations use a regularly spaced griddetermined by the dimensions of Z.C = contourc(Z) computes the contour matrix from data in matrix Z, whereZ must be at least a 2-by-2 matrix. The contours are isolines in the units of Z.The number of contour lines and the corresponding values of the contour linesare chosen automatically.C = contourc(Z,n) computes contours of matrix Z with n contour levels.C = contourc(Z,v) computes contours of matrix Z with contour lines at thevalues specified in vector v. The length of v determines the number of contourlevels. To compute a single contour of level i, use contourc(Z,[i i]).C = contourc(x,y,Z), C = contourc(x,y,Z,n), andC = contourc(x,y,Z,v) compute contours of Z using vectors x and y todetermine the x- and y-axis limits. x and y must be monotonically increasing.RemarksC is a two-row matrix specifying all the contour lines. Each contour line definedin matrix C begins with a column that contains the value of the contour(specified by v and used by clabel), and the number of (x,y) vertices in thecontour line. The remaining columns contain the data for the (x,y)pairs.C = [value1 xdata(1) xdata(2)...value2 xdata(1) xdata(2)...;dim1 ydata(1) ydata(2)...dim2 ydata(1) ydata(2)...]Specifying irregularly spaced x and y vectors is not the same as contouringirregularly spaced data. If x or y is irregularly spaced, contourc calculates2-106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!