欢迎来到天天文库
浏览记录
ID:59174345
大小:27.92 KB
页数:38页
时间:2020-10-30
《大连理工大学线性代数实验上机报告.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、大连理工大学线性代数实验上机报告实验一首先随机生成五阶方阵AA=rand(5)A=0.81470.09750.15760.14190.65570.90580.27850.97060.42180.03570.12700.54690.95720.91570.84910.91340.95750.48540.79220.93400.63240.96490.80030.95950.6787>>B=rand(5)随机生成五阶方阵BB=0.75770.70600.82350.43870.48980.74310.03180.69480.38160.44560.39220.27690.31710.7655
2、0.64630.65550.04620.95020.79520.70940.17120.09710.03440.18690.7547>>b=rand(1,5)'随机生成列向量bb=0.27600.67970.65510.16260.1190计算A+B>>A+Bans=1.57250.80360.98110.58061.14551.64890.31031.66540.80330.48130.51920.82381.27431.68131.49541.56891.00371.43561.58741.64340.80351.06200.83471.14641.4334计算A-B>>A-Bans
3、=0.0570-0.6085-0.6658-0.29690.16600.16270.24670.27580.0402-0.4099-0.26520.27000.64010.15020.20280.25790.9113-0.4648-0.00300.22460.46120.86780.76580.7726-0.0760计算A*B+B*A>>A*B+B*Aans=3.02882.30583.14392.72763.10342.90942.19673.00403.07373.25843.34222.14233.21043.57343.90494.14462.97944.36764.23544.
4、91703.13501.77873.22893.11703.2815求Ax=b的解>>x=Abx=-0.98502.43963.3124-5.65151.7085验证克莱姆法则>>c=A(:,1)c=0.81470.90580.12700.91340.6324>>d=A(:,2)d=0.09750.27850.54690.95750.9649>>e=A(:,3)e=0.15760.97060.95720.48540.8003>>f=A(:,4)f=0.14190.42180.91570.79220.9595>>g=A(:,5)g=0.65570.03570.84910.93400.67
5、87>>B1=[b';d';e';f';g']'B1=0.27600.09750.15760.14190.65570.67970.27850.97060.42180.03570.65510.54690.95720.91570.84910.16260.95750.48540.79220.93400.11900.96490.80030.95950.6787>>B2=[c';b';e';f';g']'B2=0.81470.27600.15760.14190.65570.90580.67970.97060.42180.03570.12700.65510.95720.91570.84910.913
6、40.16260.48540.79220.93400.63240.11900.80030.95950.6787>>B3=[c';d';b';f';g']'B3=0.81470.09750.27600.14190.65570.90580.27850.67970.42180.03570.12700.54690.65510.91570.84910.91340.95750.16260.79220.93400.63240.96490.11900.95950.6787>>B4=[c';d';e';b';g']'B4=0.81470.09750.15760.27600.65570.90580.2785
7、0.97060.67970.03570.12700.54690.95720.65510.84910.91340.95750.48540.16260.93400.63240.96490.80030.11900.6787>>B5=[c';d';e';f';b']'B5=0.81470.09750.15760.14190.27600.90580.27850.97060.42180.67970.12700.54690.95720.91570
此文档下载收益归作者所有