Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
If you are given an array with 3 different columns, how would you find the average of the 2nd column?
조회 수: 2 (최근 30일)
이전 댓글 표시
the first column represents years, 2nd is cases, 3rd is infection rate. how to find average # of cases?
댓글 수: 0
답변 (1개)
Image Analyst
2014년 6월 23일
meanCases = mean(theArray(:, 2));
댓글 수: 2
Image Analyst
2014년 6월 23일
Yes if your N row by 3 column array is called "cases". I didn't think it would be because cases was only the second column, with the other columns meaning different things , so I didn't think you'd call the whole array cases so that's why I called it theArray.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!