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

2 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Matt J
Matt J el 13 de Jul. de 2021
mean(reshape(yourMatrix,2,[]))

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by