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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

coneplotPurpose2coneplotPlot velocity vectors as cones in a 3-D vector fieldSyntaxDescriptionconeplot(X,Y,Z,U,V,W,Cx,Cy,Cz)coneplot(U,V,W,Cx,Cy,Cz)coneplot(...,s)coneplot(...,'quiver')coneplot(...,'method')h = coneplot(...)coneplot(X,Y,Z,U,V,W,Cx,Cy,Cz) plots velocity vectors as cones pointing inthe direction of the velocity vector and having a length proportional to themagnitude of the velocity vector.• X, Y, Z define the coordinates for the vector field.• U, V, W define the vector field. These arrays must be the same size, monotonic,and 3-D plaid (such as the data produced by meshgrid).• Cx, Cy, Cz define the location of the cones in vector field.coneplot(U,V,W,Cx,Cy,Cz) (omitting the X, Y, and Z arguments) assumes[X,Y,Z] = meshgrid(1:n,1:m,1:p) where [m,n,p]= size(U).coneplot(...,s) <strong>MATLAB</strong> automatically scales the cones to fit the graph andthen stretches them by the scale factor s. If you do not specify a value for s,<strong>MATLAB</strong> uses a value of 1. Use s =0 to plot the cones without automaticscaling.coneplot(...,'quiver') draws arrows instead of cones (see quiver3 for anillustration of a quiver plot).coneplot(...,'method') specifies the interpolation method to use. methodcan be: linear, cubic, nearest. linear is the default (see interp3 for adiscussion of these interpolation methods)h = coneplot(...) returns the handle to the patch object used to draw thecones. You can use the set command to change the properties of the cones.Remarksconeplot automatically scales the cones to fit the graph, while keeping themin proportion to the respective velocity vectors.2-95

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

Saved successfully!

Ooh no, something went wrong!