フィルターのクリア

how remove from a cell array, the words in an other cell array

2 ビュー (過去 30 日間)
elisa ewin
elisa ewin 2017 年 7 月 18 日
コメント済み: Andrei Bobrov 2017 年 7 月 18 日
Hi, I want to remove from the cell array word (attached), the words in an other cell array word_bis(attached). I have tried
out_str1 = strjoin(word(~ismember(word,stopwords_cellstring)),' ')
but it gives me an error:
Error using cell/ismember>cellismemberR2012a (line 193)
Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.
Can you help me to solve the problem? thanks

採用された回答

Andrei Bobrov
Andrei Bobrov 2017 年 7 月 18 日
w2 = word(cellfun(@ischar,word));
out_str1 = strjoin(w2(~ismember(w2,stopwords_cellstring)),' ');
  2 件のコメント
elisa ewin
elisa ewin 2017 年 7 月 18 日
thanks, it runs but I want like output a cell array, not a string
Andrei Bobrov
Andrei Bobrov 2017 年 7 月 18 日
w2 = word(cellfun(@ischar,word));
out = w2(~ismember(w2,stopwords_cellstring));

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by