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

2 visualizaciones (últimos 30 días)
Mustafa Shahid
Mustafa Shahid el 26 de Mzo. de 2022
Comentada: VBBV el 30 de Mzo. de 2022
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.

Respuesta aceptada

VBBV
VBBV el 26 de Mzo. de 2022
Editada: VBBV el 26 de Mzo. de 2022
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 comentario
VBBV
VBBV el 30 de Mzo. de 2022
Thanks is accepting answer, please accept answer if it solved your doubt, :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by