23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

2contour3<br />

Purpose Three-dimensional contour plot<br />

Syntax contour3(Z)<br />

contour3(Z,n)<br />

contour3(Z,v)<br />

contour3(X,Y,Z)<br />

contour3(X,Y,Z,n)<br />

contour3(X,Y,Z,v)<br />

contour3(...,LineSpec)<br />

[C,h] = contour3(...)<br />

contour3<br />

Description contour3 creates a three-dimensional contour plot of a surface defined on a<br />

rectangular grid.<br />

contour3(Z) draws a contour plot of matrix Z in a three-dimensional view. Z is<br />

interpreted as heights with respect to the x-y plane. Z must be at least a 2-by-2<br />

matrix. The number of contour levels and the values of contour levels are<br />

chosen automatically. The ranges of the x- and y-axis are [1:n] and [1:m],<br />

where [m,n] = size(Z).<br />

contour3(Z,n) draws a contour plot of matrix Z with n contour levels in a<br />

three-dimensional view.<br />

contour3(Z,v) draws a contour plot of matrix Z with contour lines at the<br />

values specified in vector v. The number of contour levels is equal to length(v).<br />

To draw a single contour of level i, use contour(Z,[i i]).<br />

contour3(X,Y,Z), contour3(X,Y,Z,n), and contour3(X,Y,Z,v) use X and Y<br />

to define the x- and y-axis limits. If X is a matrix, X(1,:) defines the x-axis. If<br />

Y is a matrix, Y(:,1) defines the y-axis. When X and Y are matrices, they must<br />

be the same size as Z, in which case they specify a surface as surf does.<br />

contour3(...,LineSpec) draws the contours using the line type and color<br />

specified by LineSpec.<br />

[C,h] = contour3(...) returns the contour matrix C as described in the<br />

function contourc and a column vector containing handles to graphics objects.<br />

contour3 creates patch graphics objects unless you specify LineSpec, in which<br />

case contour3 creates line graphics objects.<br />

2-315

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

Saved successfully!

Ooh no, something went wrong!