How to count number of words in a text file?
古いコメントを表示
I have a text file with a large number of words, 'filename.txt'.
I have a column of words 'A'.
Example:
A =
HJK.BT
KLP.OK
POL.ST
I want to go through column A and count how many times each of the words in column A appears in the text file. How can I do this? I tried 'textscan' but have had no luck.
Basically, I want to end up with something like:
Column A # of Times Occurred
HJK.BT 3
KLP.OK 4
POL.ST 2
採用された回答
その他の回答 (1 件)
Sarah Palfreyman
2018 年 4 月 30 日
0 投票
1 件のコメント
Mustafa Abd
2019 年 4 月 5 日
how can me get this toolbox?
カテゴリ
ヘルプ センター および File Exchange で Large Files and Big Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!