Problem plotting sequential data files with headers
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Brantosaurus
am 13 Okt. 2023
Verschoben: Dyuman Joshi
am 15 Okt. 2023
Hello. I managed to read from a sequence of files which contain numeric data in 3 columns of different lengths. I can overlay plot the first and second columns OK. How might i change the code to cope with a 3 line character header in each data file?
Tried importdata which has a header capability to but keep getting plot problems!
Any advice on whether this or another option might be better would be much appreciated. Dave
2 Kommentare
Akzeptierte Antwort
Walter Roberson
am 13 Okt. 2023
Bearbeitet: Walter Roberson
am 13 Okt. 2023
readtable with 'HeaderLines' option, after which you can table2array if you want. You might potentially need to use the ReadVariableNames false option.
In the special case that the three header lines all happen to start with % as their first non-blank character, then you can load() the text file and it will skip the lines that start with %
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Export 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!