How can I combine two text files having different columns in one file?
Show older comments
I have two text files need to be combined to one.
a.txt b.txt
1 2 4
4 3 6
i need like this
c.txt
1 2 4
4 3 6
Accepted Answer
More Answers (1)
dpb
on 19 Jun 2015
c=[textread('a.txt') textread('b.txt')];
2 Comments
Similarly to dpb's answer you can also use load:
>> c = [load('a.txt'),load('b.txt')];
Categories
Find more on Text Files 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!