calculate mean af cell
이전 댓글 표시
I have a cell with 30 rows., In each row there are 39 columns. Every ten folders belong to one person. For each column I want to calculate the average value for the ten folders and give this value instead of 10 different amounts. then do it for folders from 11 to 20 and 21 to 30.
댓글 수: 7
Azzi Abdelmalek
2014년 7월 12일
What do you mean by every ten folders?
fereshte
2014년 7월 12일
Azzi Abdelmalek
2014년 7월 12일
What do you mean by folder?
Image Analyst
2014년 7월 12일
By "folder" do you mean "row"????
fereshte
2014년 7월 13일
Azzi Abdelmalek
2014년 7월 13일
편집: Azzi Abdelmalek
2014년 7월 13일
Each 10 rows from what?
fereshte
2014년 7월 13일
채택된 답변
추가 답변 (1개)
Roger Stafford
2014년 7월 12일
If your "cell" is an ordinary 'double' 30 x 39 array, A, do this:
B = [mean(A(1:10,:),1);mean(A(11:20,:),1);mean(A(21:30,:),1)];
or else this:
B = reshape(mean(reshape(A,10,[]),1),3,[]);
Either method should work.
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!