pageeig
Eigenvalues of each page of a 3-D array.
Category: Mathematics > Linear Algebra
Syntax
e = pageeig(A)
Returns the eigenvalues of every square page A(:,:,k) as columns of a n-by-1-by-p array.
[V, D] = pageeig(A)
Also returns eigenvectors and diagonal eigenvalue matrices per page.
Description
A page is a 2-D slice along the first two dimensions. pageeig does the work of a loop that calls eig on every page, in one call. It is handy for families of matrices such as a system matrix evaluated at many parameter values.
Input arguments
A- Array of size
n-by-n-by-p(or more pages along higher dimensions).
Output arguments
e- Eigenvalues, one column per page along the third dimension.
Example
Two diagonal pages
A = cat(3, [2 0; 0 3], [1 0; 0 5]);
E = pageeig(A)
Output
E = 2×1×2
E(:,:,1) =
2
3
E(:,:,2) =
1
5