Algosim documentation: spectrum

spectrum

Compues the set of eigenvalues of a matrix.

Syntax

Description

If A is a square matrix, then spectrum(A) returns the set of the eigenvalues of A.

Examples

A ≔ ❨❨2, −2, 6, 1❩, ❨−2, 2, 0, 1❩, ❨6, 0, 2, 2❩, ❨1, 1, 2, 2❩❩
⎛ 2  −2   6   1⎞
⎜−2   2   0   1⎟
⎜ 6   0   2   2⎟
⎝ 1   1   2   2⎠
spectrum(A)
{0.22088829918, 8.84007170783, 3.29323039947, −4.35419040647}

See also