Merge multiple .mat files based on specific file name structure
Show older comments
Hi, I have over 300 .csv files that I converted to .mat files. The mat files have a specific naming culture like AB10*.mat AB11*.mat, ...AB31*.mat. So it is AB followed by day of the month followed by time.mat. I am trying to merge the files based on the date. So all files named as AB11*.mat should be able to merge. Edit: What would be the general procedure to do this?
6 Comments
Stephen23
on 4 Jun 2018
@Mehul Garg: what is your question?
Mehul Garg
on 4 Jun 2018
Stephen23
on 4 Jun 2018
@Mehul Garg: what do you mean by "merge": what do you want the output to be: one big .mat file, a text file, some other kind of file, a big variable in MATLAB memory, or a sequence of images displayed as a sequence of frames (like film) ?
Mehul Garg
on 4 Jun 2018
Stephen23
on 5 Jun 2018
@Mehul Garg: Can you please upload a few sample files by clicking the paperclip button.
KSSV
on 5 Jun 2018
files = dir('AB11*')
The above line should list the files strating with AB11.
Accepted Answer
More Answers (0)
Categories
Find more on Low-Level File I/O 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!