Matlab_1 - MAT 343 MATLAB Asisgnment 1 Question 1 > A=[2,6;3,9 A = 2 6 3 9 > B =[1,2;3,4 B = 1 2 3 4 > C=-5,5;5,3 C =-5 5 5 3 Question 2 Part A > A B

Matlab_1 - MAT 343 MATLAB Asisgnment 1 Question 1 >...

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

MAT 343 MATLAB Asisgnment 1 Question 1: >> A=[2,6;3,9] A = 2 6 3 9 >> B = [1,2;3,4] B = 1 2 3 4 >> C= [-5,5;5,3] C = -5 5 5 3 Question 2: Part A: >> A+B ans = 3 8 6 13 >> B+A ans = 3 8 6 13 Adding A+B or B+A results in the same matrix. Therefore, A and B matrix are commutative. Part B: >> (A+B)+C ans = -2 13 11 16 >> A+(B+C) ans = -2 13 11 16 The matrix is associative. The results are the same for (A+B)+C and A+(B+C).
Image of page 1

Subscribe to view the full document.

Ashtyn Murker MAT 343 Online Fall 2015, Session B Part C: >> a=5; >> a*(A+B) ans = 15 40 30 65 >> a*A+a*B ans = 15 40 30 65 Multiplication with a scalar is distributive. The results for both a(A+B) and aA+aB are the same. Part D: >> A*(B+C) ans = 40 56 60 84 >> A*B+A*C ans = 40 56 60 84 Multiplication with the matrix is distributive. A(B+C) is equivalent to AB+AC. Part E, i: >> A*B ans = 20 28 30 42 >> A*C ans = 20 28 30 42 A*B and A*C result in the same values.
Image of page 2
Ashtyn Murker MAT 343 Online Fall 2015, Session B Part E, ii: >> A*B ans = 20 28 30 42 >> B*A ans = 8 24 18 54 A*B and B*A result in different answers. Therefore they are not commutative. Question 3: >> M=zeros(2,3), N=5*eye(3,3), P=3*ones(2,2), Q=triu(ones(3,3)) M = 0 0 0 0 0 0 N = 5 0 0 0 5 0 0 0 5 P = 3 3 3 3 Q = 1 1 1 0 1 1 0 0 1
Image of page 3

Subscribe to view the full document.

Image of page 4

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes