Read data from text file write into another file
11 ビュー (過去 30 日間)
古いコメントを表示
Hi
How to read the following text
'*$rinu*'
from myfile.txt
and Write the same into myfile1.txt.
Thanks in Advance
0 件のコメント
回答 (1 件)
Kojiro Saito
2019 年 12 月 25 日
I think low level file I/O is enough for this case.
fid = fopen('myfile.txt');
data = fscanf(fid, '%s');
fclose(fid);
fidw = fopen('myfile1.txt', 'w');
fprintf(fidw, '%s', data);
fclose(fidw);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Language Support についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!