How to define limit of quiver axis?

7 ビュー (過去 30 日間)
Hamed Nobarani
Hamed Nobarani 2019 年 11 月 16 日
コメント済み: Hamed Nobarani 2019 年 11 月 16 日
How can I define limit of my x and y axis in quiver?
q quiver(X(j),Y(j),U(j),V(j),'color', cmap(idx,:))
I have tried these Three lines but it is not working.
figure(i)
title('2D')
t=num2str(i);
xlabel([t,' ps'])
% axis[(-40 80 -10 60)]
xlim([5 20])
ylim([10 15])

採用された回答

Erivelton Gualter
Erivelton Gualter 2019 年 11 月 16 日
You could use axis function. For more information check here: https://www.mathworks.com/help/matlab/ref/axis.html
See the following example. There ae two subplots, the second one just shows the plot between x = [0 1] and y=[0 1]
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure
subplot(211); quiver(x,y,u,v)
subplot(212); quiver(x,y,u,v); axis([0 1 0 1])
  1 件のコメント
Hamed Nobarani
Hamed Nobarani 2019 年 11 月 16 日
it worked. Thanks.
quiver(X(j),Y(j),U(j),V(j),'color', cmap(idx,:))
axis([4 22 4 22])

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

その他の回答 (0 件)

カテゴリ

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