|MATLAB Function Reference|
Compute 2-D stream line data
XY = stream2(x,y,u,v,startx,starty) computes stream lines from vector data
v. The arrays
y define the coordinates for
v and must be monotonic and 2-D plaid (such as the data produced by
starty define the starting positions of the stream lines. The section Starting Points for Stream Plots in Visualization Techniques provides more information on defining starting points.
The returned value
XY contains a cell array of vertex arrays.
XY = stream2(u,v,startx,starty) assumes the arrays
y are defined as
[x,y] = meshgrid(1:n,1:m) where
[m,n] = size(u).
XY = stream2(...,options) specifies the options used when creating the stream lines. 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 stream line:
If you do not specify a value, MATLAB uses the default:
streamline command to plot the data returned by
This example draws 2-D stream lines from data representing air currents over regions of North America.
Volume Visualization for related functions
Specifying Starting Points for Stream Plots for related information