Azzera filtri
Azzera filtri

How do I average specific collumn and specific rows of a matrix?

2 visualizzazioni (ultimi 30 giorni)
I have a 1000 x 9 matrix that I want to average the last 3 columns and put the result in a 1000 x 1 matrix. how should I do it ?

Risposta accettata

Stephen23
Stephen23 il 4 Feb 2018
Modificato: Stephen23 il 4 Feb 2018
Where M is the old matrix, and N the new:
N = mean(M(:,7:9),2)

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by