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!