![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/528919/image.png)
vector fields in Matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Alvaro Mª Zumalacarregui Delgado
el 23 de Feb. de 2021
Comentada: Alvaro Mª Zumalacarregui Delgado
el 23 de Feb. de 2021
I am trying to create a vector field of a diferential equation system, I know what is the real vector field, but with my code I get another. I paste my code, the system, my vector field, which is wrong, and the good vector field, someone knows what part of my code is wrong?
my code:
x1=0;
x2=2;
y1=0;
y2=2;
N = 20;
x = linspace(x1,x2,N);
y = linspace(y1,y2,N);
[X,Y]= meshgrid(x,y);
m1 = a.*x.*y/b.*x.*y;
S1 = atan (m1);
U = - cos (S1);
V = - sin (S1);
[U,V]=meshgrid(U,V);
quiver (app.Axes2, X,Y,U,V);
the system
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/528649/image.png)
my vector field, that is wrong
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/528654/image.png)
the good one
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/528659/image.png)
0 comentarios
Respuestas (1)
Ver también
Categorías
Más información sobre Graphics Objects 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!