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.

plot3Purpose2plot3Linear 3-D plotSyntaxDescriptionplot3(X1,Y1,Z1,...)plot3(X1,Y1,Z1,LineSpec,...)plot3(...,'PropertyName',PropertyValue,...)h = plot3(...)The plot3 function displays a three-dimensional plot of a set of data points.plot3(X1,Y1,Z1,...), where X1, Y1, Z1 are vectors or matrices, plots one ormore lines in three-dimensional space through the points whose coordinatesare the elements of X1, Y1, and Z1.plot3(X1,Y1,Z1,LineSpec,...) creates and displays all lines defined by theXn,Yn,Zn,LineSpec quads, where LineSpec is a line specification thatdetermines line style, marker symbol, and color of the plotted lines.plot3(...,'PropertyName',PropertyValue,...) sets properties to thespecified property values for all Line graphics objects created by plot3.h = plot3(...) returns a column vector of handles to line graphics objects,with one handle per line.RemarksIf one or more of X1, Y1, Z1 is a vector, the vectors are plotted versus the rowsor columns of the matrix, depending whether the vectors’ lengths equal thenumber of rows or the number of columns.You can mix Xn,Yn,Zn triples with Xn,Yn,Zn,LineSpec quads, for example,plot3(X1,Y1,Z1,X2,Y2,Z2,LineSpec,X3,Y3,Z3)See LineSpec and plot for information on line types and markers.ExamplesPlot a three-dimensional helix.t = 0:pi/50:10∗pi;plot3(sin(t),cos(t),t)grid onaxis square2-358

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

Saved successfully!

Ooh no, something went wrong!