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

1 次查看(过去 30 天)
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

采纳的回答

the cyclist
the cyclist 2011-4-3
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by