Quiver. Make wind scale of 1m/s inside plot
조회 수: 9 (최근 30일)
이전 댓글 표시
Luis Jesús Olvera Lazcano
. 2023년 9월 21일
댓글: Luis Jesús Olvera Lazcano
. 2023년 9월 23일
I have had a really tough time thinking of a way to show a scale of the wind vectors that Im plotting.
Im using quiversc(lon,lat,u,v) but I dont know how to put a magnitude of reference (1 m/s for example) , as in the plot below.

Thanks!
댓글 수: 0
채택된 답변
Chunru
2023년 9월 21일
편집: Chunru
님. 2023년 9월 21일
[x, y] = meshgrid(-2:.2:2);
z = x.*exp(-x.^2-y.^2);
[dx, dy] = gradient(z, 0.2);
sc = 'off'; % scale
quiver(x,y,dx,dy, sc);
axis tight;
hold on
a = axis;
% posision of the ref arrow
xr = a(1)+0.1*(a(2)-a(1));
yr = a(4)-0.1*(a(4)-a(3));
quiver(xr, yr, 1, 0, sc) % unit lenght
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!