共找到2條詞條名為streamline的結果 展開

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;
streamline[MATLAB函數]
streamline[MATLAB函數]