Borrar filtros
Borrar filtros

Row with means of each column in matrix

7 visualizaciones (últimos 30 días)
RP
RP el 25 de Ag. de 2019
Respondida: Bruno Luong el 25 de Ag. de 2019
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!

Respuestas (1)

Bruno Luong
Bruno Luong el 25 de Ag. de 2019
A = [A; mean(A,1)]

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by