Read software data files.
1 回表示 (過去 30 日間)
古いコメントを表示
I'm dealing with various software data files. When I try to open the files in wordpad there are normal English characters and some wired characters, seems they are all ASCII characters with ANSI number from around 200 to 255. Something look like "ÿÿÿÿ". I think the data must be stored in those characters but I don't know how to read those data into MATLAB since I don't have too much experience with data format handling. Thanks for your help.
1 件のコメント
Fangjun Jiang
2011 年 7 月 5 日
What is your data file look like? How do you want to process it? Just read it as string or do you have some numeric data? You need to specify your question. MATLAB can read ASCII value 200 to 255 characters.
>> char(200:255)
ans =
ÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
回答 (1 件)
Rick Rosson
2011 年 7 月 5 日
Please try the following:
filename = 'myfile.txt';
txt = fopen(filename,'r');
aStr = fscanf(txt,'%s');
fclose(txt);
ascii = uint8(aStr);
disp(ascii');
HTH.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!