Documentation

streamslice

Plot streamlines in slice planes

Syntax

streamslice(X,Y,Z,U,V,W,startx,starty,startz)
streamslice(U,V,W,startx,starty,startz)
streamslice(X,Y,U,V)
streamslice(U,V)
streamslice(...,density)
streamslice(...,'arrowsmode')
streamslice(...,'method')
streamslice(axes_handle,...)
h = streamslice(...)
[vertices arrowvertices] = streamslice(...)

Description

streamslice(X,Y,Z,U,V,W,startx,starty,startz)draws well-spaced streamlines (with direction arrows) from vector dataU,V,Win axis alignedx-,y-,z-planes at the points in the vectorsstartx,starty,startz. The sectionSpecifying Starting Points for Stream Plotsprovides more information on defining starting points.

The arraysX,Y, andZ,定义坐标U,V, andW,必须是单调的,但不需要均匀间隔。X,Y, andZmust have the same number of elements, as if produced bymeshgrid.U,V,Wmust be m-by-n-by-p volume arrays.

Do not assume that the flow is parallel to the slice plane. For example, in a stream slice at a constantz,zcomponent of the vector fieldWis ignored when you are calculating the streamlines for that plane.

Stream slices are useful for determining where to start streamlines, stream tubes, and stream ribbons.

streamslice(U,V,W,startx,starty,startz)assumesX,Y, andZ由表达确定

[X,Y,Z] = meshgrid(1:n,1:m,1:p)

where[m,n,p] = size(U).

streamslice(X,Y,U,V)draws well-spaced streamlines (with direction arrows) from vector volume dataU,V.

The arraysXandY,定义坐标UandV,必须是单调的,但不需要均匀间隔。XandYmust have the same number of elements, as if produced bymeshgrid.

streamslice(U,V)assumesX,Y, andZ由表达确定

[X,Y,Z] = meshgrid(1:n,1:m,1:p)

where[m,n,p] = size(U).

streamslice(...,density)修改流线的自动间距。densitymust be greater than0. The default value is1; higher values produce more streamlines on each plane. For example,2produces approximately twice as many streamlines, while0.5produces approximately half as many.

streamslice(...,'arrowsmode')determines if direction arrows are present or not.arrowmodecan be

  • arrows— Draw direction arrows on the streamlines (default).

  • noarrows— Do not draw direction arrows.

streamslice(...,'method')specifies the interpolation method to use.methodcan be

  • linear— Linear interpolation (default)

  • cubic— Cubic interpolation

  • nearest— Nearest-neighbor interpolation

Seeinterp3for more information on interpolation methods.

streamslice(axes_handle,...)绘制带有手柄的轴对象axes_handleinstead of into the current axes object (gca).

h = streamslice(...)returns a vector of handles to the line objects created.

[vertices arrowvertices] = streamslice(...)returns two cell arrays of vertices for drawing the streamlines and the arrows. You can pass these values to any of the streamline drawing functions (streamline,streamribbon,streamtube).

Examples

collapse all

Load thewinddata set. Draw a stream slice atz = 5.

loadwindfigure streamslice(x,y,z,u,v,w,[],[],[5]) axistight

Introduced before R2006a

Was this topic helpful?