Hello,
I try to plot vector field given by the formula:
in order to do so I defined:
y = 0:0.1:100;
x = -y;
and finaly try to plot it by quiver(x,y)
Unfortunately instead of vector filed around unit circle I get
Also, I feel like I don't get this from math perspective as well. The author says that this formula should give circular vector field which should be intuitively visibile - how, I don't see it right away.
Thanks for the clarification.

 채택된 답변

KSSV
KSSV 2021년 12월 12일

0 개 추천

y = 0:0.1:100;
x = -y;
[X,Y] = meshgrid(x,y) ;
quiver(X,Y)

댓글 수: 3

Marcin R
Marcin R 2021년 12월 12일
Thanks for the answer but this does not seem correct. Here is the plot I am looking for:
r = 1 ; % Radius of circle
C = [0 0 ] ; % Origin of circle
th = linspace(0,2*pi,100) ; %
x = C(1) + r*cos(th) ;
y = C(2) + r*sin(th) ;
plot(x,y,'b')
hold on
idx = 1:10:100 ;
quiver(x(idx),y(idx),-y(idx),x(idx))
Marcin R
Marcin R 2021년 12월 13일
Thanks, this is exactly what I was looking for.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2021년 12월 12일

댓글:

2021년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by