필터 지우기
필터 지우기

Find the number of times a number is in an array.

조회 수: 2 (최근 30일)
Portgas Ace
Portgas Ace 2012년 9월 30일
Is there a specific 'find' function wherein i can check how many times a string/number is in an array?

답변 (2개)

Image Analyst
Image Analyst 2012년 9월 30일
You can use the ismember(), hist(), or histc() functions.

bym
bym 2012년 9월 30일
one way
x = randi(10,100,1); %example data
>> sum(x==5)
ans =
8

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by