Mean of 1st and 2nd, 3rd and 4th, 5th and 6th elements and so on

2 次查看(过去 30 天)
I have a 180x1 matrix. I want the mean of 1st and 2nd, 3rd and 4th, 5th and 6th elements like this. The new matrix then have 90 elements. how to do it?

采纳的回答

Matt J
Matt J 2021-7-13
mean(reshape(yourMatrix,2,[]))

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by