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

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.

 Respuesta aceptada

madhan ravi
madhan ravi el 18 de Oct. de 2018
Editada: madhan ravi el 18 de Oct. de 2018
AllFiles=dir('*.mat'); %just specify the format correctly

3 comentarios

Thank Madhan Ravi. Big help.
madhan ravi
madhan ravi el 18 de Oct. de 2018
Editada: madhan ravi el 18 de Oct. de 2018
You‘re welcome
and what about multiple data in multiple folders

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 18 de Oct. de 2018

Comentada:

el 13 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by