MATLAB Answers


Find the mean of different sections of a matrix

Asked by jono
on 5 Apr 2014
Latest activity Commented on by jono
on 5 Apr 2014

So I have a big matrix (822717 x 1) and what I need to do is get the mean of the first 189 rows then the mean of the next 189 rows and so on. And then create a new matrix with these values. I imagine it is a simple problem but I'm new to using Matlab. Any help is appreciated.


Log in to comment.

1 Answer

Answer by Walter Roberson
on 5 Apr 2014
 Accepted Answer

mean(reshape(BigMatrix, 189, []))

  1 Comment

Perfect. Thanks a lot!

Log in to comment.

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Win prizes and improve your MATLAB skills

Play today