How to calculate cumulative average of every n values in a matrix?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Parthu P
le 22 Nov 2019
Réponse apportée : Parthu P
le 22 Nov 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 commentaires
Réponse acceptée
Plus de réponses (2)
JESUS DAVID ARIZA ROYETH
le 22 Nov 2019
solution:
mean100x20=reshape(mean(reshape(A,3,[])),100,[])
0 commentaires
Voir également
Catégories
En savoir plus sur NaNs dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!