How to calculate cumulative average of every n values in a matrix?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Parthu P
el 22 de Nov. de 2019
Respondida: Parthu P
el 22 de Nov. de 2019
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 comentarios
Respuesta aceptada
Más respuestas (2)
JESUS DAVID ARIZA ROYETH
el 22 de Nov. de 2019
solution:
mean100x20=reshape(mean(reshape(A,3,[])),100,[])
0 comentarios
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!