Function File
Function File
1:n)
where [m,
n] = size (u).
The variable s is a scalar defining a scaling factor to use for the arrows of the field
relative to the mesh spacing. A value of 0 disables all scaling. The default value is
0.9.
The style to use for the plot can be defined with a line style style of the same format
as the plot command. If a marker is specified then markers at the grid points of the
vectors are drawn rather than arrows. If the argument "filled" is given then the
markers are filled.
If the first argument hax is an axes handle, then plot into this axis, rather than the
current axes returned by gca.
The optional return value h is a graphics handle to a quiver object. A quiver object
regroups the components of the quiver plot (body, arrow, and marker), and allows
them to be changed together.
Example:
[x, y] = meshgrid (1:2:20);
h = quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10));
set (h, "maxheadsize", 0.33);
Demonstration 1
The following code
clf;
[x,y] = meshgrid (1:2:20);
h = quiver (x,y, sin (2*pi*x/10), sin (2*pi*y/10));
title ('quiver plot')
Figure 1
Demonstration 2
The following code
clf;
x = linspace (0, 3, 80);
y = sin (2*pi*x);
theta = 2*pi*x + pi/2;
quiver (x, y, sin (theta)/10, cos (theta)/10, 0.4);
axis equal tight;
hold on; plot (x,y,'r'); hold off;
title ('quiver() with scaled arrows');
Figure 1
Package: octave