资源描述:
《MATLAB习题及问题详解3.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、1.令,,(1)求和的点积(2)求和的叉乘积(3)求、、的混和积参考答案:>>A=[1,5,3];>>B=[2,1,4];>>C=[9,-1,5];(1)>>dot(A,B)ans=19(2)>>cross(B,C)ans=926-11(3)>>dot(A,cross(B,C))ans=1062.令,,,。求解下列问题:(1)(2)(3)(4)(5)(6)(7)参考答案:>>A=[2,-1;-2,-2];>>B=[2,-3;0,-4];>>C=[1;2];>>D=[1,0;0,1];(1)>>2*Aans=4-2-4-4(2)1.令,,(1)求和的点积(2)求和的叉乘积(3)求
2、、、的混和积参考答案:>>A=[1,5,3];>>B=[2,1,4];>>C=[9,-1,5];(1)>>dot(A,B)ans=19(2)>>cross(B,C)ans=926-11(3)>>dot(A,cross(B,C))ans=1062.令,,,。求解下列问题:(1)(2)(3)(4)(5)(6)(7)参考答案:>>A=[2,-1;-2,-2];>>B=[2,-3;0,-4];>>C=[1;2];>>D=[1,0;0,1];(1)>>2*Aans=4-2-4-4(2)>>A+Bans=4-4-2-6(3)>>A*Bans=4-2-414(4)>>A.*Bans=4308
3、(5)>>B*Cans=-4-8(6)>>A/Bans=1.0000-0.5000-1.00001.2500(7)>>ABans=0.6667-0.3333-0.66672.33331.求该矩阵的特征值和特征向量参考答案:>>X=[9,8,8,9;2,7,4,7;6,4,6,1;4,0,7,4]X=9889274764614074>>[V,D]=eig(X)V=-0.75430.2437+0.1991i0.2437-0.1991i-0.5547-0.38210.2241+0.4505i0.2241-0.4505i0.5493-0.41320.1132-0.5091i0.113
4、2+0.5091i0.4280-0.3382-0.6131-0.6131-0.4554D=21.470700001.1178+4.5139i00001.1178-4.5139i00002.29381.生成5阶魔术矩阵,记为,对其进行如下操作(1)求的逆(2)计算的行列式(3)求的条件数(4)求矩阵的秩(5)求矩阵的迹参考答案:>>A=magic(5)A=17241815235714164613202210121921311182529(1)>>inv(A)ans=-0.00490.0512-0.03540.00120.00340.0431-0.0373-0.00460.0127
5、0.0015-0.03030.00310.00310.00310.03640.0047-0.00650.01080.0435-0.03700.00280.00500.0415-0.04500.0111(2)>>det(A)ans=5070000(3)>>cond(A)ans=5.4618(4)>>rank(A)ans=5(5)>>trace(A)ans=651.,对进行如下操作:(1)求的LU分解(2)求的正交分解(3)求的特征值分解(4)求的奇异值分解>>X=[9,0,1,2;9,3,2,1;4,8,1,0;8,0,6,7]X=9012932148108067(1)>>[L,
6、U]=lu(X)L=1.00000001.00000.37500.15491.00000.44441.0000000.888901.00000U=9.000001.00002.000008.00000.5556-0.8889005.11115.2222000-1.4755(2)>>[Q,R]=qr(X)Q=-0.57850.28660.5381-0.5418-0.5785-0.10520.21820.7788-0.2571-0.9175-0.0818-0.2921-0.51430.2548-0.8100-0.1206R=-15.5563-3.7927-5.0783-5.3354
7、0-7.65610.68712.251200-3.9672-4.3754000-1.1492(3)>>[V,D]=eig(X)V=0.3650-0.1238-0.1819i-0.1238+0.1819i-0.03370.4317-0.2224+0.2205i-0.2224-0.2205i0.27550.3764-0.2020+0.5806i-0.2020-0.5806i-0.77510.73400.68970.68970.5676D=14.053900003.8077+2.9407i0000