how to find minimum occurrence of numbers from histrogram...reply soon please
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
the cyclist
el 3 de Abr. de 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)
Más respuestas (0)
Ver también
Categorías
Más información sobre Time Series en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!