Eigenvalues of Tridiagonal Matrices in MATLAB


Description

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