How do I import/load multiple files from folder in MATLAB?
37 views (last 30 days)
Show older comments
Laxmikant Radkar
on 18 Oct 2018
Commented: Imane AssalHi
on 13 Aug 2022
I have files named as 1.mat, 2.mat, ......, 365.mat in a one folder (C:\Users\DELL\Desktop\mat files). I need to import/load all these files one after one in workspace. How to do this by using 'for loop'?
1.mat is 2400*365 double and within the loop I want to use reshape function.
Thank you for the help in advance.
0 Comments
Accepted Answer
madhan ravi
on 18 Oct 2018
Edited: madhan ravi
on 18 Oct 2018
AllFiles=dir('*.mat'); %just specify the format correctly
3 Comments
More Answers (0)
See Also
Categories
Find more on File Operations 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!