array average every 30 values

1 visualizzazione (ultimi 30 giorni)
Hi again,
I have an Array of 1440x31 and I would like to get another Array, that's calculates the average of every 30 elements (of each row), so finally the array will be 48x31. I had a similar question but struggling to find it again,
thanks!

Risposta accettata

Honglei Chen
Honglei Chen il 6 Feb 2017
squeeze(mean(reshape(A,30,48,31)))
Assuming A is the matrix
HTH

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by