Getting mean() to return a vector
Mostrar comentarios más antiguos
I would like to get the mean of each row in nxn to be returned as a nx1 vector without looping. Is this possible?
Paul
Respuestas (1)
KSSV
el 22 de Abr. de 2017
2 votos
doc mean
it has option of providing dim you want. Let A be your n*n data.
mean(A) computes the mean of each column. mean(A,2) computes the mean of each row.
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!