フィルターのクリア

Find how many times a word appeared in matrix

2 ビュー (過去 30 日間)
Belal Abboushi
Belal Abboushi 2015 年 2 月 16 日
編集済み: Stephen23 2015 年 2 月 16 日
Hello, I'm trying to find out how many times a certain word appeared in a matrix. What command should i use?

回答 (1 件)

Stephen23
Stephen23 2015 年 2 月 16 日
編集済み: Stephen23 2015 年 2 月 16 日
A = {'anna','bob','cedric','diana','anna'};
B = 'anna';
N = sum(strcmp(A,B));

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by