FUNCTION REFERENCE

compan

Companion matrix.

Companion matrix.

Syntax

A = compan(u)

u holds polynomial coefficients, highest power first. The first row of A is

-u(2:end)/u(1) and the subdiagonal is ones, so eig(A) are the roots. u may be complex.

Example

compan([1 8 15])   % [-8 -15; 1 0]

Differences from MATLAB: the class single is not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.