In Maple, Mathematica, and Matlab, how do I obtain eigenvalues and eigenvectors?
Maple
In Maple, the command to obtain eigenvalues and eigenvectors is:
eigenvects( map(evalf, A) )Example:
> with(linalg): > A := matrix( [ [10, 0, 1], [0, 5, 1], [1, 1, 3] ] ); [ 10 0 1 ] [ ] A := [ 0 5 1 ] [ ] [ 1 1 3 ] > eigsys := eigenvects( map(evalf, A) ); eigsys := [2.471653325, 1, { [-.1225891913, -.3650187460, .9228939292]} ], [10.14389544, 1, { [ .9894258912, .02767822018, .1423738801]} ], [5.384451215, 1, { [.07751319726, -.9305886462,-.3577659480]} ] > eigsys[2][3][1][3]; .1423738801Mathematica
In Mathematica, use:
{d,v} = Eigensystem[N[a]]Example:
In[1]:= a = {{10., 0, 1}, {0, 5, 1}, {1, 1, 3}} Out[1]= {{10., 0, 1}, {0, 5, 1}, {1, 1, 3}} In[2]:= eigsys = Eigensystem[N[a]] Out[2]= { {10.1439, 5.38445, 2.47165}, > { {-0.989426,-0.0276782, -0.142374}, > {0.0775132, -0.930589, -0.357766}, > { 0.122589, 0.365019, -0.922894} } } In[3]:= eigsys[[2,1,3]] Out[3]= -0.142374Matlab
In Matlab, use:
[V,D] = eig(A)Example:
>> A = [ 10., 0, 1; 0, 5, 1; 1, 1, 3 ] A = 10 0 1 0 5 1 1 1 3 >> [V,D] = eig(A); >> [V,D] = eig(A) V = 0.9894 0.0775 -0.1226 0.0277 -0.9306 -0.3650 0.1424 -0.3578 0.9229 D = 10.1439 0 0 0 5.3845 0 0 0 2.4717 >> V(3,1) ans = 0.1424For more information about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.
Also see:
This is document afko in domain all.
Last modified on March 24, 2008.
Last modified on March 24, 2008.
Please tell us, did you find the answer to your question?






