How can i average a 1-D array every n elements?

2 次查看(过去 30 天)
I have a 1-D array of N elements, and i want to average them every k elements, but i want the output to still have the N size. Also N may or may not be an integer multiple of k. How can i do that?

回答(1 个)

infinity
infinity 2019-7-7
Hello,
I think this function is exactly what you want

类别

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