23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examples The matrix<br />

eigenvalues, it is not similar to a diagonal matrix unless it has a full<br />

(independent) set of eigenvectors. If the eigenvectors are not independent then<br />

the original matrix is said to be defective. Even if a matrix is defective, the<br />

solution from eig satisfies A*X = X*D.<br />

B = [ 3 -2 -.9 2*eps<br />

-2 4 1 -eps<br />

-eps/4 eps/2 -1 0<br />

-.5 -.5 .1 1 ];<br />

has elements on the order of roundoff error. It is an example for which the<br />

nobalance option is necessary to compute the eigenvectors correctly. Try the<br />

statements<br />

[VB,DB] = eig(B)<br />

B*VB - VB*DB<br />

[VN,DN] = eig(B,'nobalance')<br />

B*VN - VN*DN<br />

Algorithm <strong>MATLAB</strong> uses LAPACK routines to compute eigenvalues and eigenvectors:<br />

Case Routine<br />

Real symmetric A DSYEV<br />

Real nonsymmetric A:<br />

• With preliminary balance step DGEEV (with SCLFAC = 2 instead<br />

of 8 in DGEBAL)<br />

• d = eig(A,'nobalance') DGEHRD, DHSEQR<br />

• [V,D] = eig(A,'nobalance') DGEHRD, DORGHR, DHSEQR, DTREVC<br />

Hermitian A ZHEEV<br />

eig<br />

2-471

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!