mcount (mex)

버전 2.1.2.0 (3.23 KB) 작성자: Stefano Gianoli
Counts the number elements in a specified vector or matrix that match a specified criteria.
다운로드 수: 1.5K
업데이트 날짜: 2016/6/21

라이선스 보기

Given a vector or matix MATRIX, counts the number of times that the scalar X satisfy the (string) condition COND. The result is returned in the variable RES. the COND operators allowed are: ==, >=, <=, <, >, !=. The function is faster than SUM(MATRIX'COND'X) or LENGTH(FIND(MATRIX'COND'X)). A test script is provided to show the performances.

인용 양식

Stefano Gianoli (2024). mcount (mex) (https://www.mathworks.com/matlabcentral/fileexchange/5194-mcount-mex), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Analyze Simulation Results에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
2.1.2.0

small bug fix

2.1.1.0

Name changed to mcount as another function named count exist in MTREE/count.

2.1.0.0

added a test script

2.0.0.0

Can handle NaNs.
To compile it from Matlab Command Window:
>mex count.c
test with:
> count([1 2 2 3 NaN NaN Inf; 1 2 3 4 5 6 7],NaN,'!=')
ans =
12

1.0.0.0