필터 지우기
필터 지우기

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