欢迎来到天天文库
浏览记录
ID:57333342
大小:23.50 KB
页数:5页
时间:2020-08-12
《数学模型试验试题.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、数学实验报告1班级12-2姓名孙宗兴学号题目Matlab基础与矩阵运算目的要求1熟悉Matlab环境2掌握Matlab基本编程3熟悉矩阵计算问题Q1计算生成4阶随机矩阵A和B,并把矩阵中的第一个数字改成自己学号后3位数.Q2计算A+B,A*B,A.*B,A/B,A./B;Q3计算B的行列式值,逆矩阵,特征值和特征向量;Q4提取矩阵B的第一行;Q5提取矩阵B的第一列;Q6把矩阵B的第1行放在第4行,其余的第i+1行放在第i行。编写程序及运行结果Q1程序:运行结果:>>A=rand(4)A=0.95010
2、.89130.82140.92180.23110.76210.44470.73820.60680.45650.61540.17630.48600.01850.79190.4057>>B=rand(4)B=0.93550.05790.13890.27220.91690.35290.20280.19880.41030.81320.19870.01530.89360.00990.60380.7468>>A(1,1)=203A=203.00000.89130.82140.92180.23110.76210.4
3、4470.73820.60680.45650.61540.17630.48600.01850.79190.4057>>B(1,1)=203B=203.00000.05790.13890.27220.91690.35290.20280.19880.41030.81320.19870.01530.89360.00990.60380.7468Q2:>>A+Bans=406.00000.94920.96031.19401.14801.11500.64750.93701.01711.26960.81420.19
4、151.37960.02841.39571.1525>>A*Bans=1.0e+004*4.12110.00130.00290.00560.00480.00010.00010.00010.01240.00010.00000.00000.00990.00010.00000.0000>>A.*Bans=1.0e+004*4.12090.00000.00000.00000.00000.00000.00000.00000.00000.00000.00000.00000.00000.00000.00000.00
5、00>>A/Bans=0.99210.85060.64870.6331-0.02658.5467-2.7549-1.22080.0253-9.69794.73502.71180.0305-12.11685.23433.6509>>A./Bans=1.000015.39615.91403.38670.25212.15972.19323.71301.47910.56133.097011.54030.54381.87641.31160.5433Q3:>>det(B)ans=4.6798>>inv(B)ans
6、=0.0050-0.01210.00490.0013-0.01766.0327-1.3678-1.57170.0662-26.289511.32176.7433-0.059221.1905-9.1416-4.0938>>[Evect,Evalue]=eig(B)Evect=-1.0000-0.00150.0005+0.0001i0.0005-0.0001i-0.00450.3670-0.0393+0.0516i-0.0393-0.0516i-0.00200.37890.70950.7095-0.004
7、40.8496-0.6985-0.0672i-0.6985+0.0672iEvalue=1.0e+002*2.030000000.010200000.0014+0.0006i00000.0014-0.0006iQ4:>>B(1,:)ans=203.00000.05790.13890.2722Q5:>>B(:,1)ans=203.00000.91690.41030.8936Q6:>>C=B(4,:)C=0.89360.00990.60380.7468>>C=B(4,:)C=0.89360.00990.6
8、0380.7468>>>>B(2,:)=B(1,:)B=203.00000.05790.13890.2722203.00000.05790.13890.27220.41030.81320.19870.01530.89360.00990.60380.7468>>B(3,:)=B(2,:)B=203.00000.05790.13890.2722203.00000.05790.13890.2722203.00000.05790.13890.27220.8936
此文档下载收益归作者所有