How to plot constant vector field: f(x,y)=2 ax + ay

2 ビュー (過去 30 日間)
Mustafa Shahid
Mustafa Shahid 2022 年 3 月 26 日
コメント済み: VBBV 2022 年 3 月 30 日
x=-3:3;
>> y=-5:5;
>> [x,y]=meshgrid(x,y);
>> u=2;v=1;
>> quiver(x,y,u,v)
Error using quiver (line 44)
The size of X must match the size of U or the number of columns of U.

採用された回答

VBBV
VBBV 2022 年 3 月 26 日
編集済み: VBBV 2022 年 3 月 26 日
x=-3:3;
y=-5:5;
[x,y]=meshgrid(x,y);
u=repmat(2,length(x),7);
v=repmat(1,length(x),7);
quiver(x,y,u,v)
  1 件のコメント
VBBV
VBBV 2022 年 3 月 30 日
Thanks is accepting answer, please accept answer if it solved your doubt, :)

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

その他の回答 (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