Calculating an average in an n x m array that contain zeros
Mostrar comentarios más antiguos
How can i calculate an average in an array where data in the columns are zero values and I don't want the zero to be considered when computig an average.
For example: A= [2 2 ; 2 4; 1 0] >>> mean(A) results in 1.667 2 >>>the answer I want is 1.667 3
Any assistance is much appreciated.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Whos 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!