主要内容

精简

Plot streamlines from 2-D or 3-D vector data

  • 带有绘制线的三维空间

描述

example

精简(X,Y,Z,U,V,W,startx,starty,startz)从3-D矢量数据绘制流线U,V,W。指定X,Y, 和Z作为坐标数据。指定startx,starty, 和startz作为流线的起始位置。

精简(U,V,W,startx,starty,startz)uses the default coordinate data forU,V, 和W。这 (x,y,z) location for each element in U,V, 和W基于上校umn, row, and page index, respectively.

example

精简(X,Y,U,V,startx,starty)draws streamlines from 2-D vector data U和 V。指定 XY作为坐标数据。指定startx and starty作为流线的起始位置。

精简(U,V,startx,starty)uses the default coordinate data for UV。这 (x,y) location for each element in UV基于列和行索引。

example

精简(verts.)从顶点绘制流线,指定为顶点阵列的单元数组(如返回) Stream2.,Stream3., orstreamslice).

精简(___,options)draws streamlines using the specified options, defined as a one- or two-element vector with the form[step]要么[step, maxvert], wherestep是插值矢量数据的阶梯大小maxvert是流线中的最大顶点数。使用此选项与上一个语法中的任何输入参数使用。

精简(ax,___)plots into the specified axes, instead of into the current axes object (gca).

example

lineobj= streamline(___)返回一个Line目的。采用lineobjto modify properties of the streamlines after creating them. For a list of properties, seeLine Properties

Examples

collapse all

加载winddataset, which loads the 3-D arraysu,v,w,x,y, 和z,代表北美地区的气流。绘制在飞机上以均匀间隔点开始的流线x = 80

loadwind[startx,starty,startz] = meshgrid(80,20:10:50,0:5:15);Streamline(x,y,z,u,v,w,startx,starty,startz)轴紧的view(3);

图包含轴对象。The axes object contains 16 objects of type line.

Define arraysx,y,u, 和v。创建一个Quiver Plot以可视化向量数据。然后,绘制在沿线的不同点开始的流程y = 1

[x,y] = meshgrid(0:0.1:1); u = x; v = -y; quiver(x,y,u,v) startx = 0.1:0.1:1; starty = ones(size(startx)); streamline(x,y,u,v,startx,starty)

图包含轴对象。The axes object contains 11 objects of type quiver, line.

加载wind数据集和使用Stream3.to compute the vertices of streamlines that start at evenly spaced points on the planex = 80。Then, plot the streamlines from the vertex data.

loadwind[startx,starty,startz] = meshgrid(80,20:10:50,0:5:15);verts.= stream3(x,y,z,u,v,w,startx,starty,startz); streamline(verts) axis紧的view(3);

图包含轴对象。The axes object contains 16 objects of type line.

绘制流程并返回线路对象l

[x,y] = meshgrid(-10:10); u = 2.*x.*y; v = y.^2 - x.^2; l = streamslice(x,y,u,v); axis紧的

图包含轴对象。轴对象包含112个类型的类型的对象。

Set the line width of the streamlines to 2. Set their color to red. Use thesetfunction to change the properties of all the lines at the same time.

套(L,'LineWidth',2) set(l,'颜色','r');

图包含轴对象。轴对象包含112个类型的类型的对象。

Input Arguments

collapse all

x-axis coordinate data, specified as a 2-D or 3-D array. It must be monotonic, but does not need to be uniformly spaced.

X,Y,Z,U,V, 和Wmust be the same size.

You can use theMeshgrid.function to createX,Y, 和Zmatrices.

y-axis coordinate data, specified as a 2-D or 3-D array. It must be monotonic, but does not need to be uniformly spaced.

X,Y,Z,U,V, 和Wmust be the same size.

You can use theMeshgrid.function to createX,Y, 和Zmatrices.

z-AXIS坐标数据,指定为3-D阵列。它必须是单调的,但不需要均匀间隔。

X,Y,Z,U,V, 和Wmust be the same size.

You can use theMeshgrid.function to createX,Y, 和Zmatrices.

x-components of vector data, specified as a 2-D or 3-D array.

X,Y,Z,U,V, 和Wmust be the same size.

y-components of vector data, specified as a 2-D or 3-D array.

X,Y,Z,U,V, 和Wmust be the same size.

z- 矢量数据的组件,指定为3-D阵列。

X,Y,Z,U,V, 和Wmust be the same size.

x-AXIS流线的起始位置,指定为向量或矩阵。

startx,starty, 和startzmust be the same size.

y-AXIS流线的起始位置,指定为向量或矩阵。

startx,starty, 和startzmust be the same size.

z-AXIS流线的起始位置,指定为向量或矩阵。

startx,starty, 和startzmust be the same size.

简化顶点,指定为单元格数组(如返回 Stream2.,Stream3., orstreamslice). Each element of the cell array is a matrix of vertices for one line.

Streamline drawing options, specified as a one- or two-element vector with the following form:

  • [step]

  • [step,maxvert]

Wherestepis the step-size used for interpolating the vector data andmaxvert是流线中的最大顶点数。

默认的步长大小是.1和the default maximum number of vertices is1000

目标轴, specified as an目的。If you do not specify the axes, then the精简功能使用当前轴。

Extended Capabilities

在R2006A之前介绍