1. 程式人生 > >Matlab基本函數-feather函數

Matlab基本函數-feather函數

detail 頭發 羽毛 log 符號 復數 ade 函數 Language

1、feather函數:繪制羽毛圖(速度向量圖)

2、用法說明:

(1)feather(x,y) 函數繪制由向量參量x與y構成的速度向量,沿水平軸方向,從均勻間隔點以箭頭發射出來;

(2)feather(z) 函數繪制羽毛圖。參量z是一個復數,則feather(z)相當於compass(real(z),imag(z));

(3)feather(...,LineSpec) 函數繪制羽毛圖。參量LineSpec指定的線型、標記符號、顏色等屬性畫出羽毛圖;

(4)H = feather(...) 函數返回羽毛圖中線型對象的句柄H。

3、舉例說明

(1)feather(x,y)

a、源碼

>> x = rand(50,1)

x =

    0.8147
    0.9058
    0.1270
    0.9134
    0.6324
    0.0975
    0.2785
    0.5469
    0.9575
    0.9649
    0.1576
    0.9706
    0.9572
    0.4854
    0.8003
    0.1419
    0.4218
    0.9157
    0.7922
    0.9595
    0.6557
    0.0357
    0.8491
    0.9340
    0.6787
    0.7577
    0.7431
    0.3922
    0.6555
    0.1712
    0.7060
    0.0318
    0.2769
    0.0462
    0.0971
    0.8235
    0.6948
    0.3171
    0.9502
    0.0344
    0.4387
    0.3816
    0.7655
    0.7952
    0.1869
    0.4898
    0.4456
    0.6463
    0.7094
    0.7547

>> y = rand(50,1)

y =

    0.2760
    0.6797
    0.6551
    0.1626
    0.1190
    0.4984
    0.9597
    0.3404
    0.5853
    0.2238
    0.7513
    0.2551
    0.5060
    0.6991
    0.8909
    0.9593
    0.5472
    0.1386
    0.1493
    0.2575
    0.8407
    0.2543
    0.8143
    0.2435
    0.9293
    0.3500
    0.1966
    0.2511
    0.6160
    0.4733
    0.3517
    0.8308
    0.5853
    0.5497
    0.9172
    0.2858
    0.7572
    0.7537
    0.3804
    0.5678
    0.0759
    0.0540
    0.5308
    0.7792
    0.9340
    0.1299
    0.5688
    0.4694
    0.0119
    0.3371

>> feather(x,y)
b、結果

技術分享圖片

(2)feather(z)

a、源碼

>> z = 1 + 2i

z =

   1.0000 + 2.0000i

>> feather(z)
b、結果

技術分享圖片

(3)feather(...,LineSpec)

a、源碼

 feather(x,y,‘:‘)
b、結果

技術分享圖片

(4)H = feather(...)

a、源碼

>> H = feather(x,y,‘:‘)

H =

  174.0054
  175.0015
  176.0013
  177.0013
  178.0013
  179.0013
  180.0013
  181.0013
  182.0013
  183.0013
  184.0013
  185.0013
  186.0013
  187.0013
  188.0013
  189.0013
  190.0013
  191.0013
  192.0013
  193.0013
  194.0013
  195.0013
  196.0013
  197.0013
  198.0013
  199.0013
  200.0013
  201.0013
  202.0013
  203.0013
  204.0013
  205.0013
  206.0013
  207.0013
  208.0013
  209.0013
  210.0013
  211.0013
  212.0013
  213.0013
  214.0013
  215.0013
  216.0013
  217.0013
  218.0013
  219.0013
  220.0013
  221.0013
  222.0013
  223.0013
  224.0013

4、附錄

>> help feather
 feather Feather plot.
    feather(U,V) plots the velocity vectors with components U and V as
    arrows emanating from equally spaced points along a horizontal axis.
    feather is useful for displaying direction and magnitude data that
    is collected along a path.
 
    feather(Z) for complex Z is the same as feather(REAL(Z),IMAG(Z)).
    feather(...,‘LineSpec‘) uses the color and linestyle specification
    from ‘LineSpec‘ (see PLOT for possibilities).
 
    feather(AX,...) plots into AX instead of GCA.
 
    H = feather(...) returns a vector of line handles.
 
    Example:
       theta = (-90:10:90)*pi/180; r = 2*ones(size(theta));
       [u,v] = pol2cart(theta,r);
       feather(u,v), axis equal
 
    See also compass, rose, quiver.

    Overloaded methods:
       gpuArray/feather

    Reference page in Help browser
       doc feather


再分享一下我老師大神的人工智能教程吧。零基礎!通俗易懂!風趣幽默!還帶黃段子!希望你也加入到我們人工智能的隊伍中來!https://blog.csdn.net/jiangjunshow

Matlab基本函數-feather函數