Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

eig

Computes the eigenvalues and eigenvectors of a given matrix.

References

eig(M)

Solves the eigenproblem of a matrix A and return a vector with all (and degenerate) eigenvalues.

Argument M

Matrix

Returns 1. entry

Matrix : The eigenvalues of the matrix stored in a vector.

Returns 2. entry

Matrix : The eigenvectors of the matrix stored in a matrix.

Example

eig([1,2,3;4,5,6;7,8,9])

Returns a vector with the three eigenvalues 16.11684, -1.11684 and 0 of this 3x3 matrix.

Example

[vals, vecs] = eig([1,2,3;4,5,6;7,8,9])

Saves a vector with the three eigenvalues 16.11684, -1.11684 and 0 of this 3x3 matrix in the variable vals and a matrix containing the eigenvectors in the variable vecs.

Clone this wiki locally