How to remove first three columns from a text file?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Want to have a text file with only the last four column values. Thanks
2 Kommentare
Cg Gc
am 18 Dez. 2018
I am having a similar problem.
I would like to keep the first 13 columns in the text file and get rid of the remaining. The header can stay or not as it is ignored in my analysis.
I tried the code below, but it either didn't work because of the header.
blah = importdata('tdump00120100.txt');
datayouwant = blah.data;
Struct contents reference from a non-struct array object.<--error message
Or I ended up with a long column of data instead of rows.
Any help would be appreciated. I have lots of these files to do.
Thanks bunches.
Antworten (1)
Jon
am 13 Feb. 2016
blah = importdata('1_rowdel.txt');
datayouwant = blah.data;
save('mydata.txt','datayouwant','-ascii')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!