How to calculate cumulative average of every n values in a matrix?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi, I have 300x20 matrix (A). How to calculate average of every 3 consecutive rows of each column to have output matrix B (100x20)?
댓글 수: 0
채택된 답변
추가 답변 (2개)
JESUS DAVID ARIZA ROYETH
2019년 11월 22일
solution:
mean100x20=reshape(mean(reshape(A,3,[])),100,[])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!