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
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Time Series 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!