how do I plot reference arrow in quiver plot?

35 ビュー (過去 30 日間)
Lilya
Lilya 2017 年 9 月 20 日
コメント済み: Lilya 2017 年 9 月 20 日
Hi all,
I have a quiver plot that I want to plot a reference arrow on it? as the attachment shows. could anyone help?
thank you

採用された回答

Tim Berk
Tim Berk 2017 年 9 月 20 日
I would just add an extra arrow of given length to the vector field:
% random array of vectors
x=[1:6]; y=[1:5];
u = rand(numel(y),numel(x));
v = rand(numel(y),numel(x));
% create an extra entry for the reference arrow
x = [x max(x)+1];
u = [u NaN(numel(y),1)]; u(1,end) = 1;
v = [v NaN(numel(y),1)]; v(1,end) = 0;
figure
quiver(x,y,u,v)
text(max(x),1,'1 m/s','verticalalignment','bottom')
  1 件のコメント
Lilya
Lilya 2017 年 9 月 20 日
THank you so much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by