means of a number of rows
이전 댓글 표시
I have a table with 86400 rows and 4 columns. For each column I would like to calculate a mean for every 1800 rows. Finally, I expect to have a table with 48 rows and 4 columns.
Something like that is working, but it is too big...
u_mean=[mean(u(1:1800,1)) mean(u(1:1800,2)) mean(u(1:1800,3)) mean(u(1:1800,4));mean(u(1801:3600,1)) mean(u(1801:3600,2)) mean(u(1801:3600,3)) mean(u(1801:3600,4));mean(u(3601:5400,1)) mean(u(3601:5400,2)) mean(u(3601:5400,3)) mean(u(3601:5400,4));mean(u(5401:7200,1)) mean(u(5401:7200,2)) mean(u(5401:7200,3)) mean(u(5401:7200,4));mean(u(7201:9000,1)) mean(u(7201:9000,2)) mean(u(7201:9000,3)) mean(u(7201:9000,4));mean(u(9001:10800,1)) mean(u(9001:10800,2)) mean(u(9001:10800,3)) mean(u(9001:10800,4));mean(u(10801:12600,1)) mean(u(10801:12600,2)) mean(u(10801:12600,3)) mean(u(10801:12600,4));mean(u(12601:14400,1)) mean(u(12601:14400,2)) mean(u(12601:14400,3)) mean(u(12601:14400,4))];
Could you advice for something else?
Furthermore, if I have additionally a table with time (86400,3), first column for hour, second column for minutes and third column for seconds, there is a way to have means for rows in certain times?
Thanks.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Neighborhood and Block Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!