InsightWorks

InsightWorks

Here are a few examples showing how eigenvalues are computed in various software packages. Most
packages will also return the eigenvectors, if requested.

**Using Ox:**

#includemain() { decl a,eigs; a = <1, 2; 3, 4>; // Compute the eigenvalues and store them in eigs. The & is // needed so that Ox can use eigs to return the eigenvalues. eigen( a, &eigs ); print( eigs ); }

**Using Gauss:**

let x[2,2] = {1 2,3 4}; eig(x);

**Using Maple:**

# This line activates the linear algebra package. It produces two # messages about norm and trace being redefined, which is OK. with(linalg): # # Create a matrix # a:=matrix( [ [1,2],[3,4] ] ); # # Calculate its eigenvalues # b:=eigenvals(a); # # Exit from maple # quit;

Site Index |
Zoom |
Admin

URL: http://www.insightworks.com/pages/817.html

InsightWorks

Revised 06/04/2004

URL: http://www.insightworks.com/pages/817.html

InsightWorks

Revised 06/04/2004