Change file header and save the file -- do this for all files in directory.
Mostrar comentarios más antiguos
Hello MatLab Community,
I need help with some data text files. I have various text files with different names. I want to load each file into MatLab and change the first line (headers) in each file (so they all end up with the same headers) and then save the file.
Files looks something like:
FILE 1
Date, Time_1, Data_1
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
FILE 2
Date, Time_2, Data_2
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
I want them all with the same header, example:
Date, Time, Data
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
02032023, 24:25, 34234.4
How can I go about doing this?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!