Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

stream3 - Compute 3-D streamline data

Syntax

XYZ = stream3(X,Y,Z,U,V,W,startx,starty,startz)
XYZ = stream3(U,V,W,startx,starty,startz)
XYZ = stream3(...,options)

Description

XYZ = stream3(X,Y,Z,U,V,W,startx,starty,startz) computes streamlines from vector data U, V, W. The arrays X, Y, Z define the coordinates for U, V, W and must be monotonic and 3-D plaid (such as the data produced by meshgrid). startx, starty, and startz define the starting positions of the streamlines. The section "Specifying Starting Points for Stream Plots" provides more information on defining starting points.

The returned value XYZ contains a cell array of vertex arrays.

XYZ = stream3(U,V,W,startx,starty,startz) assumes the arrays X, Y, and Z are defined as [X,Y,Z] = meshgrid(1:N,1:M,1:P) where [M,N,P] = size(U).

XYZ = stream3(...,options) specifies the options used when creating the streamlines. Define options as a one- or two-element vector containing the step size or the step size and the maximum number of vertices in a streamline:

[stepsize]

or

[stepsize, max_number_vertices]

If you do not specify values, MATLAB software uses the default:

Use the streamline command to plot the data returned by stream3.

Examples

This example draws 3-D streamlines from data representing air currents over regions of North America.

load wind
[sx sy sz] = meshgrid(80,20:10:50,0:5:15);
streamline(stream3(x,y,z,u,v,w,sx,sy,sz))
view(3)

See Also

coneplot, stream2, streamline

Volume Visualization for related functions

Specifying Starting Points for Stream Plots for related information

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS