quiver(X,Y,DX,DY)draws arrows at every pair of elements in matrices
Y. The pairs of elements in matrices
DYdetermine the direction and relative magnitude of the arrows. If
Yare vectors, they must have
length(x) = nand
length(y) = mwhere
[m,n] = size(DX) = size(DY). In this case, the arrows represent
(x(j),y(i),DX(i,j), DY(i,j)). Note that vector
Xcorresponds to the columns of
Ycorresponds to the rows.
x = 1:n and
y = 1:m. In this case
DY are defined over a geometrically rectangular grid.
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
linetype specifies line type and color using any legal line specification as described under the
[x,y] = meshgrid(-2:.2:2);
z = x.*exp(-x.^2-y.^2);
[dx,dy] = gradient(z,.2,.2);
(c) Copyright 1994 by The MathWorks, Inc.