Quiver plotting arrow length

조회 수: 9 (최근 30일)
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013년 4월 6일
I want to plot a quiver plot of one arrow.
x=1;
y=1;
u=3;
v=4;
quiver(x,y,v,u)
I would expect that the arrow would start at point (1,1) and the length in the x direction would 3 while the length on the y direction would be 4.So the magnitude of the vector would be 5.
But this isn't the case. Can you explain me why? Thank you.

채택된 답변

the cyclist
the cyclist 2013년 4월 6일
편집: the cyclist 2013년 4월 6일
Two things:
(1) It looks like you swapped the u and v arguments compared to how you actually want them, so I think you actually want
quiver(x,y,u,v)
(2) There is an automatic scaling that occurs to the arrow (which is described in the documentation). You can turn off that scaling:
quiver(x,y,u,v,0)
I believe that will result in the plot you expect.
  댓글 수: 1
Giorgos Papakonstantinou
Giorgos Papakonstantinou 2013년 4월 6일
Indeed I had swapped u and v values but if it wasn't your second comment I wouldn't know the answer. Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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