我试图在单词列表中找到最常用的单词。到目前为止,这是我的代码:
uniWords = unique(lower(words));
for i = 1:length(words)
for j = 1:length(uniWords)
if (uniWords(j) == lower(words(i)))
freq(j) = freq(j) + 1;
end
end
end
当我尝试运行脚本时,出现以下错误:
Undefined function 'eq' for input arguments of
type 'cell'.
Error in Biweekly3 (line 106)
if (uniWords(j) == lower(words(i)))
任何帮助表示赞赏!