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

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Matt J
Matt J il 13 Lug 2021
mean(reshape(yourMatrix,2,[]))

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by