Effacer les filtres
Effacer les filtres

how to find minimum occurrence of numbers from histrogram...reply soon please

1 vue (au cours des 30 derniers jours)
Hello to all! i wana to find the minimum occurrence of number from histrogram, there could be more than one minimum numbers having same occurrence. suppose LE=[-1 -1 -2 -3 -2 -2 -4 -4 -1 -3 -5 -10].... i want to find all minumm occurrence of numbers. how would i write matlab code for expression { LN=arg min hist(e). where 'e' belongs to LE? } please reply its soon
thanks

Réponse acceptée

the cyclist
the cyclist le 3 Avr 2011
This will do the task. I hope I didn't just do your homework for you. If I did, please study this code carefully and try to learn what you were supposed to learn by doing it yourself.
LE = [-1 -1 -2 -3 -2 -2 -4 -4 -1 -3 -5 -10]
uniqueLE = unique(LE);
count_of_each_LE = hist(LE,uniqueLE);
min_count_of_each_LE = min(count_of_each_LE)
index_to_all_LE_with_min_count = (count_of_each_LE==min_count_of_each_LE);
LE_with_min_count = uniqueLE(index_to_all_LE_with_min_count)
  2 commentaires
Talat
Talat le 3 Avr 2011
Wow!!! you did great... it works ...thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by