How do I import/load multiple files from folder in MATLAB?

12 vues (au cours des 30 derniers jours)
Laxmikant Radkar
Laxmikant Radkar le 18 Oct 2018
Commenté : Imane AssalHi le 13 Août 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.

Réponse acceptée

madhan ravi
madhan ravi le 18 Oct 2018
Modifié(e) : madhan ravi le 18 Oct 2018
AllFiles=dir('*.mat'); %just specify the format correctly
  3 commentaires
madhan ravi
madhan ravi le 18 Oct 2018
Modifié(e) : madhan ravi le 18 Oct 2018
You‘re welcome
Imane AssalHi
Imane AssalHi le 13 Août 2022
and what about multiple data in multiple folders

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by