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

1 Ansicht (letzte 30 Tage)
Joydeb Saha
Joydeb Saha am 13 Jul. 2021
Beantwortet: Matt J am 13 Jul. 2021
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?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by