array average every 30 values

3 Ansichten (letzte 30 Tage)
Nikolas Spiliopoulos
Nikolas Spiliopoulos am 6 Feb. 2017
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!

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by