Read data from text file write into another file
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
How to read the following text
'*$rinu*'
from myfile.txt
and Write the same into myfile1.txt.
Thanks in Advance
0 commentaires
Réponses (1)
Kojiro Saito
le 25 Déc 2019
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 commentaires
Voir également
Catégories
En savoir plus sur Text Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!