Calculating an average in an n x m array that contain zeros
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Whos in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!