西安邮电大学《Matlab程序设计基础》课内实验报告题目:实验二MATLAB语言矩阵运算院系名称:计算机学院专业名称:计算机科学与技术班级:计科1502班内序号:05141107(29)学生姓名:赵阳指导教师:张老师实验二MATLAB语言矩阵运算一、实验目的:掌握基本的矩阵运算及常用的函数。二、实验内容:1、下列运算是否合法,为什么?如合法,结果是多少?(1)result1=a'合法result1=142536(2)result2=a*b不合法,应采用点乘(3)result3=a+b合法result3=3625811(4)result4=b*d合法result4=312222404913(5)result5=[b;c']*d合法result5=312222404913-5-87(6)result6=a.*b不合法(7)result7=a./b不合法(8)result8=a.*c不合法(9)result9=a.\b不合法(10)result10=a.^2不合法,等价于a*a(11)result11=a^2不合法(12)result12=2.^a不合法2、用MATLAB求下面的的方程组。(1)运行结果x=0.49790.14450.0629-0.0813(2)运行结果x=1.00005.0000-5.0000-2.00003、已知(1)求矩阵A的秩(rank)a1=4(2)求矩阵A的行列式(determinant)a2=12568(3)求矩阵A的逆(inverse)a3=0.1744-0.0303-0.01250.0270-0.10500.0789-0.01210.00060.00830.01730.0911-0.03110.0095-0.0185-0.01030.0795(4)求矩阵A的特征值及特征向量(eigenvalueandeigenvector)V是特征向量,d是特征值v=Columns1through3-0.7629+0.0000i0.0919+0.0640i0.0919-0.0640i0.6223+0.0000i0.6087+0.0276i0.6087-0.0276i0.0807+0.0000i-0.7474+0.0000i-0.7474+0.0000i-0.1554+0.0000i0.0342-0.2374i0.0342+0.2374iColumn4-0.0299+0.0000i0.2637+0.0000i0.6434+0.0000i0.7180+0.0000id=Columns1through34.8554+0.0000i0.0000+0.0000i0.0000+0.0000i0.0000+0.0000i12.6460+1.8333i0.0000+0.0000i0.0000+0.0000i0.0000+0.0000i12.6460-1.8333i0.0000+0.0000i0.0000+0.0000i0.0000+0.0000iColumn40.0000+0.0000i0.0000+0.0000i0.0000+0.0000i15.8526+0.0000i4、关系运算与逻辑运算已知a=20,b=-2,c=0,d=1(1)r1=abr1=1(2)r2=ab&cdr2=0(3)r3=a==b*(-10)r3=1(4)r4=~b|cr4=0三、思考题,求y=?(用formatlong查看y的值)方法一:n=-10:1:10方法二:方法三y=0;formatlonggy=0;t=-10x=2.^nfort=-10:10whilet=10y=sum(x)y=y+2^t;y=y+2^t;endyt=t+1;endy四、实验体会