plot vectors from a point to another point

18 ビュー (過去 30 日間)
jorjijon
jorjijon 2012 年 10 月 22 日
I want to plot a vector from a defined point(like (-2,-3)) to another point (like(2,7)) in matlab.what should I do? Thanks

採用された回答

Matt Fig
Matt Fig 2012 年 10 月 22 日
編集済み: Matt Fig 2012 年 10 月 22 日
cla
quiver(2,3,5,5,0) % Set scale to zero
axis tight
As I told you in your previous question, you need to do some math and transform from figure coords to axes coords to use the figure annotation arrow like you want. This will involve reading the documentation!
If you had read the documentation for QUIVER, you wouldn't have had to wait 2 days to get it right...
  1 件のコメント
jorjijon
jorjijon 2012 年 10 月 22 日
Thank you very much !!!!

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

その他の回答 (1 件)

Sachin Ganjare
Sachin Ganjare 2012 年 10 月 22 日
I think you can use 'quiver' command.
Refer below link:
Hope it helps!!!
  3 件のコメント
Sachin Ganjare
Sachin Ganjare 2012 年 10 月 22 日
Can you elaborate about the error?
jorjijon
jorjijon 2012 年 10 月 22 日
for example quiver(2,3,5,5) will plot a vector from (2,3).but it will not end at (7,8).

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

カテゴリ

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