I have a text file containing certain story that i want to read using Matlab. How can i do that?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a text file containing
"In [7] genetic algorithm is combined with neural network for intrinsic plagiarism detection. Approach of [7] consists of two parts: document pre-processing and neural network evolution. During pre-processing several stylometric features such as Number of punctuation marks, Sentence length (number of characters), Sentence word frequency class, etc. are extracted and an average document wide value for each features are calculated."
I want to read that text file using Matlab. How can i do that??
Thanks
0 件のコメント
回答 (1 件)
dpb
2014 年 12 月 22 日
Depends on what you want/need to do with it once you've read it...
As a cell array of strings, one cell/line
file = textread('filename.txt','%s','delimiter','\n','whitespace','');
As a cell array, one cell of size number of space-delimited words...
fid=fopen('filename.txt','r');
file=textscan(fid,'%s','collectoutput',true);
As a character image array...
fid=fopen('filename.txt','r');
file=fread(fid,[],'*char');
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Analytics Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!