|
|
| File Information |
| Description |
C = COUNTMEMBER(A,B) counts the number of times the elements of array A are present in array B, so that C(k) equals the number of occurences of A(k) in B. A may contain non-unique elements. C will have the same size as A.
A and B should be of the same type, and can be cell array of strings.
Examples:
countmember([1 2 1 3],[1 2 2 2 2])
-> 1 4 1 0
countmember({'a','b','c'},{'a','x','a'})
-> 2 0 0
See also ismember, unique, histc
(v1.2, dec 2008) |
| MATLAB release |
MATLAB 6.5 (R13)
|
| Other requirements |
should work on most ML releases (tested for R13+). |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (6) |
| 05 Sep 2011 |
Abhinav Gaur
|
|
|
| 19 Dec 2008 |
Pete sherer
|
|
|
| 05 Dec 2007 |
Jalal A
|
|
|
| 08 Feb 2007 |
Val cucche
|
|
|
| 02 Jun 2005 |
urs (us) schwarz
|
|
|
| 31 May 2005 |
Dimitri Shvorob
|
|
|
| Updates |
| 18 Aug 2005 |
Reduced overhead by removing unnecessary dummy variables. |
| 18 Aug 2005 |
Reduced overhead by removing unnecessary dummy variables. |
| 21 Dec 2008 |
improved help and comments, fixed some spelling issues |
|
Contact us