MATLAB Answers

0

Row with means of each column in matrix

Asked by Rose Potter on 25 Aug 2019 at 9:24
Latest activity Answered by Bruno Luong
on 25 Aug 2019 at 9:33
I have a matrix with data and would like to add one last row that contains the means of each column. Sounds easy enough but I have not been able to figure out how to do it, every time I try I just get one overall mean of all the numbers. I hope someone can help - thank you in advance!

  0 Comments

Sign in to comment.

1 Answer

Answer by Bruno Luong
on 25 Aug 2019 at 9:33

A = [A; mean(A,1)]

  0 Comments

Sign in to comment.