Scilab 6.1.0

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.

See the recommended documentation of this function

# companion

companion matrix

### Syntax

A=companion(p)

### Arguments

- p
polynomial or vector of polynomials

- A
square matrix

### Description

Returns a matrix `A`

with characteristic polynomial equal
to `p`

if `p`

is monic. If `p`

is not monic
the characteristic polynomial of `A`

is equal to
`p/c`

where `c`

is the coefficient of largest degree
in `p`

.

If `p`

is a vector of monic polynomials, `A`

is block diagonal,
and the characteristic polynomial of the ith block is `p(i)`

.

### Examples

### See also

- spec — eigenvalues of matrices and pencils
- poly — Polynomial definition from given roots or coefficients, or characteristic to a square matrix.
- randpencil — random pencil

Report an issue | ||

<< Matrix Pencil | Matrix Pencil | ereduc >> |