{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

solution4 - Assignment 4 Prob 1 A=[7 3 4 5;2 9 5 8;3 6 1 9...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
% Assignment 4 % Prob. 1 A=[7 3 4 5;2 9 5 8;3 6 1 9]; B=[6 3 9 5;4 8 5 3;1 9 7 2]; disp('A+B') A+B disp('A-B') A-B disp('A.*B') A.*B disp('A./B') A./B disp('A.^B') A.^B disp('A+4') A+4 disp('2*A') 2*A A+B ans = 13 6 13 10 6 17 10 11 4 15 8 11 A-B ans = 1 0 -5 0 -2 1 0 5 2 -3 -6 7 A.*B ans = 42 9 36 25 8 72 25 24 3 54 7 18 A./B ans = 1.1667 1 0.44444 1 0.5 1.125 1 2.6667 3 0.66667 0.14286 4.5 A.^B ans = 117649 27 262144 3125 16 43046721 3125 512 3 10077696 1 81 A+4 ans = 11 7 8 9 6 13 9 12 7 10 5 13 2*A ans =
Image of page 2
14 6 8 10 4 18 10 16 6 12 2 18 % Prob. 2 disp('sum(A)') sum(A) disp(' ') disp('cumsum(A)') cumsum(A) disp(' ') sum(A) ans = 12 18 10 22 cumsum(A) ans = 7 3 4 5 9
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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