Getting -Inf when applying the mean to log values
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yasmin Samy
le 20 Déc 2017
Commenté : Star Strider
le 20 Déc 2017
Hello all,I have a very large set of numbers. I got the log and then used the following line to get the monthly mean Fine_avg = varfun(@mean,avgFine_table,'GroupingVariables','month');
for some reason i am getting -Inf and I'm not sure why. I tried removing all negative values and zeros before getting their Log, but no effect. This isn't happening to other sets of data. Can someone let me know what i'm missing or what i should check for.
thanks
0 commentaires
Réponse acceptée
Star Strider
le 20 Déc 2017
One option is to use min(x) or min(abs(x)) with two outputs, so you can find at least one of the elements causing the problem.
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown 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!