HW3_ENED1091_WINTER_2018 (1).docx

HW3_ENED1091_WINTER_2018 (1).docx - ENED 1091 Homework...

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

View Full Document Right Arrow Icon
ENED 1091: Homework Assignment #3 Due: Week of February 5 th at the beginning of your Recitation Section Problem 1 : (Min and Max Functions) Create the following matrix in MATLAB: M = 3 4 0 -3 3 0 -1 -1 3 -3 5 4 -3 -3 -2 For each of the following, use the max or min functions. Paste both the command and the result in the space below. (a) What MATLAB command would determine the largest value in the entire matrix? MATLAB Command and Results: max(max(M) 5 (b) What MATLAB command would determine the smallest value in each of the columns? MATLAB Command and Results: Min(M) -3 -3 -2 (c) What MATLAB command would determine the smallest value in each of the rows? MATLAB Command and Results: min(M,[],2) 0 -3 -1 -3 -3 (d) What MATLAB command would determine the smallest value in column 2? MATLAB Command and Results: min(min(M,[],2)) -3 (e) What MATLAB command would determine the largest value in rows 3 & 4? (Note: we want a single value here not a maximum for each row) MATLAB Command and Results: Problem 2 : (Sum Function) Create the following matrix in MATLAB (same as Problem 1): M = 3 4 0 -3 3 0 -1 -1 3
Image of page 1

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

View Full Document Right Arrow Icon
-3 5 4 -3 -3 -2 (a) Use the sum function to add all of the entries in matrix M. MATLAB Command and Results: Sum(sum(M)) 10 (b) Use the sum function to determine the sum of each column.
Image of page 2
Image of page 3
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