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개)

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 CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by