请输入您要查询的百科知识:

 

词条 streamline
释义

函数简介

函数功能:在MATLAB中, streamline函数用于绘制二维、三维流线图。

语法格式:

streamline(X,Y,Z,U,V,W,startx,starty,startz)

绘制三维向量(U,V,W)的流线型矢量场。(X,Y,Z)定义了矢量(U,V,W)的坐标,而且(X,Y,Z)必须是三维的数据网格(通常情况下,调用meshgrid或ndgrid函数可以生成这样的数据网格)。(startx,starty,startz)定义了这些流线的起点。帮助文档Specifying Starting Points for Stream Plots专题为我们提供了指定流线起点的资料。

streamline(U,V,W,startx,starty,startz)

该调用格式假定[X,Y,Z] = meshgrid(1:N,1:M,1:P),其中[M,N,P] = size(U)。

streamline(XYZ)

其中XYZ是预先生成的由矩阵构成的元胞数组(例如,通过调用stream3函数)。

streamline(X,Y,U,V,startx,starty)

X、Y、U、V必须是同型矩阵, 且至少应是2行2列的。

绘制二维矢量(U,V)的流线型矢量场。(X,Y)是(U,V)的坐标,且(X,Y)必须是二维的数据网格(通常由meshgrid或ndgrid函数产生)。(startx,starty)指定了这些描绘矢量场的流线的起点坐标。输出参数是一个向量,向量里存储着每根流线的句柄。

streamline(U,V,startx,starty)

这里缺省生成(X,Y):[X,Y] = meshgrid(1:N,1:M),其中[M,N] = size(U)。

streamline(XY)

streamline(...,options)

streamline(axes_handle,...)

h = streamline(...)

相关函数:coneplot, stream2, stream3, streamparticles,plot3

程序示例

close all; clear; clc;

hold on;

vertexs = [ [1.0,1.0]; [1.1,1.1]; [1.2,1.18]; [1.3,1.24]; [1.4,1.28]; ...

[1.5,1.3]; [1.6,1.3]; [1.7,1.28]; [1.8,1.24]; [1.9,1.18]; [2.0,1.1] ];

for c = 1:size(vertexs, 1)

plot(vertexs(c, 1),vertexs(c, 2), '--rs','LineWidth', 1, ...

'MarkerEdgeColor','k', 'MarkerFaceColor','g', 'MarkerSize',5);

end

XY = {vertexs}; % mat2cell

streamline(XY);

hold off;

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/1 18:46:56