how to modify a file. txt
Show older comments
Hello,
I would like some advice from someone to do this job: I have to copy the lines of a text file to an another text file created by me until it comes from a certain string. Arrived at this string, I stop copying and I have to insert at the end of these copied lines other lines of text coming from a third .txt file
Thanks in advance for the advice
3 Comments
Mathieu NOE
on 28 Oct 2022
Edited: Mathieu NOE
on 28 Oct 2022
hello
what have you tried so far ?
if you don't know where to start from look for how processing strings and char array
like
MR
on 28 Oct 2022
Hi,
does this help you?
% Open file
file = fopen('myFile.txt', 'w');
% Write text into my txt file which I just created
fprintf(file, 'My own Text goes here.');
Federico Paolucci
on 28 Oct 2022
Accepted Answer
More Answers (0)
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!