how to merge multiple csv files to create a timetable for synchronization?
Afficher commentaires plus anciens
Hello,
I have 6 oxygen and 29 temperature time series file in csv format. Both of the groups have different time steps and their row numbers also differ within themselves. My main aim to sychronize them according to certain time step.
I previously read each data as below but it is time consuming to write each file name and read them. I am new to matlab so could not figure out how to merge all the timetables and read them at once or is it really required to merge them for this purpose? Is there a smarter way to read all the directory in a loop and create a merged timetable including the original file names? I appreciate your support!
%Temperature
f015712=readtimetable("015712_20190824_0951_eng.csv")
f015713=readtimetable("015713_20190824_1013_eng.csv")
f015714=readtimetable("015714_6.8m.csv")
f015715=readtimetable("015715_20190824_1120_eng.csv")
.
% 22 more files
.
f011563=readtimetable("011563_39.8.csv")
f011564=readtimetable("011564_40.85.csv")
f011565=readtimetable("011565_41.9m.csv")
%Oxygen
opto_2612_8=readtimetable("opto_2612_8.csv")
opto_2617_17=readtimetable("opto_2617_17.csv")
opto_2619_21=readtimetable("opto_2619_21.csv")
opto_2621_25=readtimetable("opto_2621_25.csv")
opto_2632_37=readtimetable("opto_2632_37.csv")
opto_2639_40=readtimetable("opto_2639_40.csv")
timetable1=synchronize(duo5100,f015712, f015713, f015714, f015715, f015716, f015717, f015718, f015719, ...
f015720, f015722, f015723, f015732, f015733, f015734, f015735, f015736, f015737, f015738,f011538, ...
f011539, f011540, f011542, f011543, f011544, f011545, f011551, f011553, f011554, f011555, ...
f011556, f011560, f011562, f011563, f011564, f011565,duo11861,opto_2612_8, opto_2617_17, opto_2619_21, ...
opto_2621_25, opto_2632_37, opto_2639_40,defi005,weather19, ...
'regular','fillwithmissing',"TimeStep",minutes(60))
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Tables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
