how to load values for a vector field?
how to load values for a vector field?
(OP)
The examples I see for vector fields go somewhat like this...
[x,y] = meshgrid(-10:1:10,-10:1:10);
M = x;
N = -y;
quiver(x,y,M,N)
I don't want to use a function to fill in the values, but want to load point by point.
For example, if I want to manually load the first element, in this case the element at (-10,-10) with the values (3.2,-1.9), how would I do it?
[x,y] = meshgrid(-10:1:10,-10:1:10);
M = x;
N = -y;
quiver(x,y,M,N)
I don't want to use a function to fill in the values, but want to load point by point.
For example, if I want to manually load the first element, in this case the element at (-10,-10) with the values (3.2,-1.9), how would I do it?





RE: how to load values for a vector field?
The vector field is drawn by 'quiver(x,y,U,V)'
x and y are the coords to draw the vector and U and V are the values for the vector.
So to do what you stated above make 4 matrices that have the same dimensions one for each x,y,U,V.
and then pass them to quiver to get your vector field plot.