how could I calculate frequency in 3 different text?

2 次查看(过去 30 天)
Could you help me how to calculate frequency in the text
I could do it if I have 1 text
words is my first tex name which split
[w_u, idx, idxU]=unique(words) ;
counts=accumarray(idxU, 1) ;
[~, idxS]=sort(counts, 'descend') ;
words_us = words_u(idxS) ;
counts_s =counts(idxS) ;
result=[words_us, num2cell(counts_s)]
but if I have 3 different text how to compair and find the same words like
word text1 text2 text3
and 5 6 7
the 5 4 5
or 4 3 5
...

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by