How to get average of an array except considering the last element of the array
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to get the average of an array without considering the last element of the array.
Thanks in advance.
Réponse acceptée
Andrei Bobrov
le 2 Fév 2017
Let A - your double array
B = A(:);
out = mean(B(1:end-1));
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Types dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!