Integrating several text files

1 view (last 30 days)
Morteza Tohidi
Morteza Tohidi on 2 Dec 2020
Commented: Walter Roberson on 3 Dec 2020
I have several text files which each of them contains thousands of numbers in 2 columns. I want to integrate them all into one file with the same formate, starting from the first row of the first file and ending with the last row of the last file.

Answers (1)

David Hill
David Hill on 3 Dec 2020
Just read them in and concatenate.
for n=1:numberoffiles
fileName=sprintf('yourfile%d',n);%assuming file names are numbered

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!