How to make matlab access two folders for data when separated by date
1 view (last 30 days)
I'm trying to move some of the older data into a new folder (ex: move pre2020 files from folder_new to folder_old, and leave the 2020~ files in the folder_new).
Problem is that there are some functions where the user needs to analyze files in both folders (ex: data from Dec 2019 to Feb 2020)
How should I proceed with this?
I was thinking about using an if statement, but not sure how to make matlab look at both folders when a function needs data from both folder_new and folder_old.
Folder structure is via
Benjamin Thompson on 1 Jul 2022
Edited: Benjamin Thompson on 1 Jul 2022
You can get file dates using the "dir" function or keyword in MATLAB. Does any of this help?
>> D = dir
105×1 struct array with fields:
>> datetime(D(1).date) > datetime(2020, 1, 1)
>> datetime(D(1).date) > datetime(2022, 6, 18)