How to calculate cumulative average of every n values in a matrix?
2 次查看(过去 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 中查找有关 NaNs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!