欢迎来到天天文库
浏览记录
ID:27330505
大小:1.68 MB
页数:104页
时间:2018-12-02
《matlab程序设计和应用第二版课后题和实验答案解析全-刘卫国》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、完美WORD格式第二章3.设矩阵A为A=[24239216;6574241121;345987521;8424253121;4321456421];(1)B=A(2:5,1:2:5)B=652421349821842121434521(2)A(7)=[]A=246534843235422192498424521117553646212112121(3)A+30(4)size(A);ndims(A)(5)题目有误(6)reshape(x,3,4)(7)abs(x)(8)char(x)4.L1=000010000L2=111110000L3=00011
2、1000L4=4565.(1)B=A(1:3,:)C=A(:,1:2)D=A(2:4,3:4)E=B*CB=23.000010.0000-0.7780041.0000-45.000065.00005.000032.00005.0000032.0000C=23.000010.000041.0000-45.000032.00005.00006.0000-9.5400D=65.00005.0000专业知识分享完美WORD格式第二章3.设矩阵A为A=[24239216;6574241121;345987521;8424253121;4321456421];
3、(1)B=A(2:5,1:2:5)B=652421349821842121434521(2)A(7)=[]A=246534843235422192498424521117553646212112121(3)A+30(4)size(A);ndims(A)(5)题目有误(6)reshape(x,3,4)(7)abs(x)(8)char(x)4.L1=000010000L2=111110000L3=000111000L4=4565.(1)B=A(1:3,:)C=A(:,1:2)D=A(2:4,3:4)E=B*CB=23.000010.0000-0.778
4、0041.0000-45.000065.00005.000032.00005.0000032.0000C=23.000010.000041.0000-45.000032.00005.00006.0000-9.5400D=65.00005.0000专业知识分享完美WORD格式032.000054.00003.1400E=1.0e+003*0.9141-0.22391.20802.71231.1330-0.2103(2)E5、Dans=111111~D6、~Eans=001000find(A>=10&A<7、25)ans=156.all(A)ans=0any(A)ans=1isnan(A)ans=0100000isinf(A)ans=专业知识分享完美WORD格式0011000isfinite(A)ans=10001117.A(1).x1=’学号’;A(1).x2=’姓名’;A(1).x3=’专业’;A(1).x4.x41=’成绩1’;……….A(2).x1=’学号’;A(2).x2=’姓名’;A(2).x3=’专业’;A(2).x4.x41=’成绩1’;……….A(3).x1=’学号’;A(3).x2=’姓名’;A(3).x3=’专业’;A(3).x48、.x41=’成绩1’;……….A(4).x1=’学号’;A(4).x2=’姓名’;A(4).x3=’专业’;A(4).x4.x41=’成绩1’;……….A(5).x1=’学号’;A(5).x2=’姓名’;A(5).x3=’专业’;A(5).x4.x41=’成绩1’;……….8.(1)size(B)ans=22ndims(B)ans=2(2)B(2)ans=[3x3doubleB(4)ans={3x3cell}(3)B(3)=[]B=[1][3x3double]{3x3cell}B{3}=[]B=[1][3x3double][]第三章1.(1)A=e9、ye(3)(2)A=100+100*rand(5,6)(3)A=1+sqrt(0.2)*randn(10,50)(4)B=ones(size(A))(5)A+30*eye(size(A))(6)B=diag(diag(A))2.B=rot90(A)C=rot90(A,-1)专业知识分享完美WORD格式3.B=inv(A);A的逆矩阵C=det(A);A的行列式的值D=A*BE=B*AD=E因此A与A-1是互逆的。4.A=[42-1;3-12;1230];b=[2;10;8];x=inv(A)*bx=-6.000026.666727.33335.(110、)diag(A);主对角线元素ans=1159triu(A);上三角阵ans=1-12301-4200520009tril
5、Dans=111111~D
6、~Eans=001000find(A>=10&A<
7、25)ans=156.all(A)ans=0any(A)ans=1isnan(A)ans=0100000isinf(A)ans=专业知识分享完美WORD格式0011000isfinite(A)ans=10001117.A(1).x1=’学号’;A(1).x2=’姓名’;A(1).x3=’专业’;A(1).x4.x41=’成绩1’;……….A(2).x1=’学号’;A(2).x2=’姓名’;A(2).x3=’专业’;A(2).x4.x41=’成绩1’;……….A(3).x1=’学号’;A(3).x2=’姓名’;A(3).x3=’专业’;A(3).x4
8、.x41=’成绩1’;……….A(4).x1=’学号’;A(4).x2=’姓名’;A(4).x3=’专业’;A(4).x4.x41=’成绩1’;……….A(5).x1=’学号’;A(5).x2=’姓名’;A(5).x3=’专业’;A(5).x4.x41=’成绩1’;……….8.(1)size(B)ans=22ndims(B)ans=2(2)B(2)ans=[3x3doubleB(4)ans={3x3cell}(3)B(3)=[]B=[1][3x3double]{3x3cell}B{3}=[]B=[1][3x3double][]第三章1.(1)A=e
9、ye(3)(2)A=100+100*rand(5,6)(3)A=1+sqrt(0.2)*randn(10,50)(4)B=ones(size(A))(5)A+30*eye(size(A))(6)B=diag(diag(A))2.B=rot90(A)C=rot90(A,-1)专业知识分享完美WORD格式3.B=inv(A);A的逆矩阵C=det(A);A的行列式的值D=A*BE=B*AD=E因此A与A-1是互逆的。4.A=[42-1;3-12;1230];b=[2;10;8];x=inv(A)*bx=-6.000026.666727.33335.(1
10、)diag(A);主对角线元素ans=1159triu(A);上三角阵ans=1-12301-4200520009tril
此文档下载收益归作者所有