Find the number of times a number is in an array.
이전 댓글 표시
Is there a specific 'find' function wherein i can check how many times a string/number is in an array?
답변 (2개)
Image Analyst
2012년 9월 30일
1 개 추천
You can use the ismember(), hist(), or histc() functions.
bym
2012년 9월 30일
one way
x = randi(10,100,1); %example data
>> sum(x==5)
ans =
8
카테고리
도움말 센터 및 File Exchange에서 Elementary Math에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!