A.10. Eigenvalues and Eigenvectors

There are two SAS functions—one for each—to compute the eigenvalues and to compute the eigenvectors of a symmetric matrix. These are EIGVAL and EIGVEC respectively. For the symmetric matrix denoted by SYM and given as,


the statements

sym ={4 2, 2 4};
eval_sym = eigval(sym)
evec_sym = eigvec(sym);
print eval_sym,evec_sym;

produce the desired eigenvalues and eigenvectors.

The subroutine EIGEN will achieve both tasks in a single call. The corresponding statement is

call eigen(lambda,p,sym);
print lambda,p;

The eigenvalues and respective eigenvectors are stored in A and P. Columns of P are the eigenvectors.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.204.201