MATLAB: How find occorrences of words in a cell array

cell arrayMATLAB

Hi, I have two cell array uniqueWord e word (attached): I want to know, how many times the words in uniqueWord are presents in word, can you help me?

Best Answer

[~,c] = ismember(word,uniqueWord);
out = [uniqueWord, num2cell(accumarray(c,1))];