QUIVER

Quiver plot.

QUIVER(X,Y,DX,DY) draws little arrows at every (X,Y) pair in

matrices X and Y. The (DX,DY) pairs in matrices DX and DY

determine the direction and magnitude of the arrows.

QUIVER(x,y,DX,DY), with two vector arguments replacing the first

two matrix arguments, must have length(x) = n and

length(y) = m where [m,n] = size(DX) = size(DY).  In this case, the

arrows are the quads (x(j), y(i), DX(i,j), DY(i,j)).

Note that x corresponds to the columns of DX and DY and y corresponds

to the rows.

QUIVER(DX,DY) uses x = 1:n and y = 1:m. In this case DX and DY

are defined over a geometrically rectangular grid.

QUIVER(X,Y,DX,DY,S) and QUIVER(DX,DY,S) apply scalar S as a scale

factor to the lengths of the arrow. For example, S = 2 doubles

their relative length and S = 0.5 halves them.

A final trailing string argument specifies linetype and color using

any legal line specification as described under the plot command.

For example, try

xord = -2:.2:2;

yord = -2:.2:2;

[x,y] = meshgrid(xord,yord);

z = x .* exp(-x.^2 - y.^2);

[px,py] = gradient(z,.2,.2);

contour(x,y,z),hold on, quiver(x,y,px,py), hold off

See also GRADIENT, COMPASS, FEATHER, ROSE.