array average every 30 values

1 次查看(过去 30 天)
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!

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by