how to average num of column for each row?
Mostrar comentarios más antiguos
Hi all,
Thank for the help in advance.
I have a matrix in dim. of 972 (rows) * 715 (columns) I want to make an average of each row then divided by the num of columns. the final matrix should be 972*1 could any one help me with this? in for loop (because I will apply it in addition for other matrices)
thank you so much.
Respuesta aceptada
Más respuestas (1)
KSSV
el 23 de Ag. de 2017
doc mean you can specify the dimension there and get what you want.
A = rand(972,715) ;
M = mean(A,2) ;
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!