# LAB1MAT343_FINAL.docx - MAT 343 MATLAB Assignment#1 Matrix...

• Lab Report
• Jkinkea01
• 11
• 100% (4) 4 out of 4 people found this document helpful

This preview shows page 1 - 4 out of 11 pages.

MAT 343 MATLAB Assignment #1Matrix ALgebra:A = [1 -1 2;3 4 1;1 -6 4]A =1 -1 23 4 11 -6 4B= [.2 .5 1;3.1 .8 2;3.6 4.1 2.2;]B = 0.2000 0.5000 1.00003.1000 0.8000 2.00003.6000 4.1000 2.2000C = [1 2;3 -1;-2 3;]C =1 23 -1-2 3Question 1 (i)A+Bans =1.2000 -0.5000 3.00006.1000 4.8000 3.00004.6000 -1.9000 6.2000(ii)B+Aans =1.2000 -0.5000 3.00006.1000 4.8000 3.00004.6000 -1.9000 6.2000(iii)A+C%Matrix dimensions must agree.(iv)1+C
3
0
4
9
5
ans =2.4000 -1.0000 6.000012.2000 9.6000 6.00009.2000 -3.8000 12.4000a.Yes, MATLAB did refuse to compute Question 1 (iii) A+C due to the dimensions not being the same. Also (viii) was unable to be calculated due to the number of rows in the first matrix column not matching the rows in the second matrix row.b.Yes, A+B and B+A are exactly the same values verifying the commutative properties of matrices.c.No, the values of A*B are not the same as B*A .d.The matrix C added to a value of 1.2.A=[0 1;3 4;]A =0 13 4B=[1 2;2 7;]B =1 22 7C=[1 3 1;-1 2 1;]C =1 3 1-1 2 1