Extracting text from .txt file and place into a string.

I have a number of txt files which contain famous speeches. How do I open the file, and extract the entire speech and place it into a string? After that I wish to do a separate count for all words in the speech.

Antworten (1)

Chad Greene
Chad Greene am 26 Mär. 2015

0 Stimmen

You can use textscan to import the text, then allwords to count words.

Kategorien

Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 26 Mär. 2015

Beantwortet:

am 26 Mär. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by