欢迎来到天天文库
浏览记录
ID:27846085
大小:38.00 KB
页数:7页
时间:2018-12-06
《matlab实验二矩阵基本运算(一)答案》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、专业资料整理实验一矩阵基本运算(一)(1)设A和B是两个同维同大小的矩阵,问:1)A*B和A.*B的值是否相等?A=[234;415;367];B=[431;352;549];A*B,A.*Bans=373744443751656778ans=894125101524632)A./B和B.A的值是否相等?A=[234;415;367];B=[431;352;549];A./B,B./A完美WORD格式专业资料整理ans=0.50001.00004.00001.33330.20002.50000.60001.50000.7778ans=2.000
2、01.00000.25000.75005.00000.40001.66670.66671.28572)A/B和BA的值是否相等?A=[234;415;367];B=[431;352;549];A/B,B/Aans=-0.34520.51190.36900.7857-0.78570.6429-0.97621.30950.5952ans=110.0000-15.0000-52.0000完美WORD格式专业资料整理92.0000-13.0000-43.0000-22.00004.000011.00002)A/B和BA所代表的数学含义是什么?解:A/
3、B是B*A的逆矩阵BA是B*A的逆矩阵(2)写出完成下列操作的命令。1)将矩阵A第2—5行中第1,3,5列元素赋给矩阵B。A=[0.95010.45650.92180.41030.13890.01530.23110.01850.73820.89360.20280.74680.60680.82140.17630.05790.19870.44510.48600.44470.40570.35290.60380.93180.89130.61540.93550.81320.27220.46600.76210.79190.91690.00990.19880
4、.4186]B=A(2:5,[1,3,5])A=0.95010.45650.92180.41030.13890.01530.23110.01850.73820.89360.20280.74680.60680.82140.17630.05790.19870.44510.48600.44470.40570.35290.60380.93180.89130.61540.93550.81320.27220.46600.76210.79190.91690.00990.19880.4186B=0.23110.73820.20280.60680.17630.19
5、870.48600.40570.60380.89130.93550.27222)删除矩阵A的第7号元素。A=rand(6,6);>>A(7)=[inf]A=0.8385Inf0.17300.13650.28440.5155完美WORD格式专业资料整理0.56810.62130.97970.01180.46920.33400.37040.79480.27140.89390.06480.43290.70270.95680.25230.19910.98830.22590.54660.52260.87570.29870.58280.57980.44490
6、.88010.73730.66140.42350.76043)将矩阵A的每个元素值加30。B=A+30B=30.950130.456530.921830.410330.138930.015330.231130.018530.738230.893630.202830.746830.606830.821430.176330.057930.198730.445130.486030.444730.405730.352930.603830.931830.891330.615430.935530.813230.272230.466030.762130.791
7、930.916930.009930.198830.41864)求矩阵A的大小和维数。N=size(A)n=rank(A)N=66n=65)将向量t的0元素用机器零来代替。A=[101035]A=101035>>A(A==0)=[]A=1135完美WORD格式专业资料整理6)将含有12个元素的向量x转换成3*4矩阵。>>x=(1:2:23)x=1357911131517192123>>A=zeros(3,4)A=000000000000>>A(:)=xA=17131939152151117237)求一个字符串的ASCII码。>>A='Ilovemy
8、mother'A=Ilovemymother>>double(A)完美WORD格式专业资料整理ans=73321081111181013
此文档下载收益归作者所有