Navigation

Operators and Keywords

Function List:

C++ API

: compass (u, v)
: compass (z)
: compass (…, style)
: compass (hax, …)
: h = compass (…)

Plot the (u, v) components of a vector field emanating from the origin of a polar plot.

The arrow representing each vector has one end at the origin and the tip at [u(i), v(i)]. If a single complex argument z is given, then u = real (z) and v = imag (z).

The style to use for the plot can be defined with a line style style of the same format as the plot command.

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 vector of graphics handles to the line objects representing the drawn vectors.

a = toeplitz ([1;randn(9,1)], [1,randn(1,9)]);
compass (eig (a));

See also: polar, feather, quiver, rose, plot.

Demonstration 1

The following code

 clf;
 randn_9x1_data = [-2.555884; 0.394974; -0.191871; -1.147024; 1.355425; -0.437335; -0.014370; -0.941312; 1.240300];
 randn_1x9_data = [1.42934, -1.10821, -1.70404, 0.63357, -0.68337, -1.19771, -0.96502, -1.12810, 0.22457];
 a = toeplitz ([1;randn_9x1_data], [1,randn_1x9_data]);
 compass (eig (a));
 title ("compass() example");

Produces the following figure

Figure 1

Package: octave