Matlab基本函数-feather函数

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、结果

Matlab基本函数-feather函数_第1张图片

(2)feather(z)

  a、源码

>> z = 1 + 2i

z =

   1.0000 + 2.0000i

>> feather(z)
  b、结果



(3)feather(...,LineSpec) 

   a、源码

 feather(x,y,':')
   b、结果

Matlab基本函数-feather函数_第2张图片

(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



你可能感兴趣的:(matlab,基本函数,羽毛图,featherx,feather)