Key to MATLAB Exercise 4 School of Mathematical Sciences Xiamen Univer http:/edjpkc.xmu.ed > A2=10*rand(4): B2-A2*A2, generate a symmetric matrix B2 We omitted the following for it is similar to that of exlo > P=fix(10*rand(3)); >>Dl=diag(0,1,2]),D2=diag(1:3); JordanI=100,021;002] > Singular Matrix*DI for Dl is a singular matrix > NotSingularMatrix=P*D2 >>Diagonal Matrix P any symmetric matrix is diagonal >>Qr=qr(P); >>NotDiagonalMatrixQ"*Jordani*Q 11. Omitted Key to Ex4-6Key to MATLAB Exercise 4 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu.cn Key to Ex46 >> A2=10*rand(4); B2=A2*A2'; % generate a symmetric matrix B2 We omitted the following for it is similar to that of Ex10. 10. >> P=fix(10*rand(3)); >> D1=diag([0, 1, 2]); D2=diag(1:3); Jordan1=[1 0 0; 0 2 1; 0 0 2]; >> SingularMatrix=P*D1; % for D1 is a singular matrix >> NotSingularMatrix=P*D2; >> DiagonalMatrix=P’ *P; % any symmetric matrix is diagonal. >> [Q r]=qr(P); >> NotDiagonalMatrix=Q’*Jordan1*Q; 11. Omitted