Eigenvalues of Tridiagonal Matrices in MATLAB
Description
- TRIDEIG computes all the eigenvalues of a symmetric tridiagonal
matrix.
- BIDSVD computes all the singular values of a bidiagonal
matrix.
- MAXEIG computes the largest eigenvalue of a symmetric tridiagonal
matrix.
The functions are implemented as MEX-file wrappers to the LAPACK functions
DSTEQR, DBDSQR, and DSTEBZ.
Download
Typically, you need to download the help file and the binary file for
your platform, for each function.
The binaries are compiled on MATLAB R2010b.
Example
Compute and plot the eigenvalues of the 1000-by-1000 matrix
>> n=1000;
>> l=trideig(2*ones(n,1),-ones(n-1,1));
>> plot(l)
Compare with the exact expression
>> l0=2-2*cos(pi*(1:n)'/(n+1));
>> norm(l-l0,inf)
ans =
6.6613e-015
Per-Olof Persson
Department of Mathematics, UC Berkeley
persson@berkeley.edu