MEMBERSHIP

バージョン 1.0.0.0 (595 Bytes) 作成者: Mukhtar Ullah
Membership of elements of one array in another.
ダウンロード: 1.8K
更新 2005/6/7

ライセンスがありません

MEMBERSHIP counts membership of elements of one array in another.

C = MEMBERSHIP(A,B) for the array A returns an array of the same size as A containing the number of instances of the elements of A in the array B. A and B can be character arrays or cell arrays of strings.

Examples:
membership(1:6,pascal(3)) returns [5 1 2 0 0 1]
membership('MASK','MISSISSIPI') retruns [1 0 4 0]
membership({'john','gul';'sim','ku'},{'sim','gul','kid','gul'}) returns
[0 2;1 0]

See also FREQTABLE, ISMEMBER

引用

Mukhtar Ullah (2024). MEMBERSHIP (https://www.mathworks.com/matlabcentral/fileexchange/7796-membership), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R14
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0

a check included