# prob3 - Store the answer in the variable"arrMax"...

This preview shows page 1. Sign up to view the full content.

% 8/29/2009 5:40 PM % Script Name: prob3 % Script Variables: % 1. colSum - A row vector of sums of columns of "arr". % 2. rowAvg - A column vector of averages of rows of "arr". % 3. arrMax - The maximum of "arr". % % Problem Statement: % In the given "prob3" script is an array "arr" that is 5x25. % % (a) Find the sum of each column. The output should be a row vector % (1xN). Store you answer in the variable "colSum". % % (b) Find the average (mean) of each row. The output should be a column % vector (Mx1). Store your answer in the variable "rowAvg". Hint: % Use the transpose operator. % % (c) Find the maximum of the entire array.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Store the answer in the % variable "arrMax". % DO NOT MODIFY ARR arr = [76,96,85,36,36,30,9,14,18,61,46,83,12,88,44,15,86,9,43,50,79,15,25,18,56; 27,56,27,21,84,76,7,58,80,28,10,55,97,10,92,88,63,25,6,35,40,95,36,66,31; 52,15,82,26,59,76,54,48,32,66,24,100,2,41,20,59,36,14,91,91,25,96,83,74,75; 71,16,26,62,56,39,79,3,54,70,92,9,78,27,28,56,52,20,95,38,41,58,3,66,20; 90,27,93,48,92,58,94,35,18,76,17,45,82,81,16,16,41,25,50,13,11,7,6,46,69]; % Start coding here colSum = sum(arr); rowAvg = mean(arr')'; arrMax = max(max(arr));...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern