正在加载图片...
Key to MATLAB Exercise 4 School of Mathematical Sciences Xiamen Univer http:/edjpkc.xmu.ed >> abs( Singular ValuesOfA. 2-RootOfAA)< 10(-10) ans roots ofA'A. That is, the singular values of A equal the square roots of the engenvalues of AAo The singular values of A are 3.9090, 0.8485, their square equal those of the characteris Try to use Singular ValuesofA. 2=-RootOfAA, and explain the result 8 >>A=[4 3 12; -17-110: 1 12 3 Poly=poly(A); roots( PolyA) 16.8781 2.4391+10.695li 2.4391-10.6951i eig(A) ans 2.4391+10.695li 2.4391-10.6951i ans -16.87812.1204-124708 0243917.7919 14679924391 ans 218740 14.6390 6.3427 >>svd(A)2 478.4705 40.2293 40.2293 214.3003 478.4705 The above show that we may use functions eig and roots to calculate the eigenvalues of a matrix. The result of function schur is in real that is. it will not show the eigenvalues of A if there are complex eigenvalues. And svd provides the values which are the square roots of th eigenvalues ofA'A >>Alrand(4): bl=A1+Al generate a symmetric matrix B Key to Ex4-5Key to MATLAB Exercise 4  School of Mathematical Sciences Xiamen University  http://gdjpkc.xmu.edu.cn  Key to Ex4­5  >> abs(SingularValuesOfA.^2­RootOfAA) < 10^(­10) ans =  1  1  The singular values  of A are 3.9090,  0.8485, their square equal  those of the characteristic roots of A’A. That is, the singular values of A equal the square roots of the engenvalues of A’A.  Try to use SingularValuesOfA.^2==RootOfAA, and explain the result.  8. >> A=[­4 3 12; ­17 ­11 0; 1 12 3]; PolyA=poly(A); roots(PolyA) ans =  ­16.8781  2.4391 +10.6951i  2.4391 ­10.6951i  >> eig(A) ans =  ­16.8781  2.4391 +10.6951i  2.4391 ­10.6951i  >> schur(A) ans =  ­16.8781  2.1204  ­12.4708  0  2.4391  7.7919  0  ­14.6799  2.4391  >> svd(A) ans =  21.8740  14.6390  6.3427  >> svd(A)^2  ans =  478.4705  214.3003  40.2293  >> eig(A'*A) ans =  40.2293  214.3003  478.4705  The above show that we may use functions  eig and roots to calculate the eigenvalues  of a matrix. The result of function schur is in real, that is, it will not show the eigenvalues of A if there are complex  eigenvalues.  And svd provides  the values  which  are the square roots of the eigenvalues of A’A.  9. >> A1=rand(4); B1=A1+A1';  % generate a symmetric matrix B1
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有