FUNCTION REFERENCE

sptarn

Solve a generalized sparse symmetric eigenvalue problem on an interval.

Solve a generalized sparse symmetric eigenvalue problem on an interval.

Syntax

[xv,lmb,iresult] = sptarn(A,B,lb,ub); [xv,lmb,iresult] = sptarn(A,B,lb,ub,spd,tolconv,jmax,maxmul)

Computes eigenpairs of A*x = lambda*B*x with lb < lambda <= ub for real symmetric matrices A and symmetric positive definite B (sparse or dense). Returns B-normalized eigenvectors xv (n-by-k), ascending eigenvalues lmb (k-by-1), and the number of eigenvalues found iresult (k >= 0). Optional arguments spd, tolconv, jmax, and maxmul default to 0, 100*eps, 100, and max(n,100); empty [] selects defaults.

Example

A=sparse([2 -1 0;-1 2 -1;0 -1 2]); B=speye(3); [xv,lmb,n]=sptarn(A,B,0,3); n==2 && abs(lmb(1)-(2-sqrt(2)))<1e-10

Differences from MATLAB: real symmetric A and symmetric positive definite B only; nonsymmetric or complex pencils and infinite ub for large sparse matrices are not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.