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

조회 수: 4 (최근 30일)
Laxmikant Radkar
Laxmikant Radkar 2018년 10월 18일
댓글: Imane AssalHi 2022년 8월 13일
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.

채택된 답변

madhan ravi
madhan ravi 2018년 10월 18일
편집: madhan ravi 2018년 10월 18일
AllFiles=dir('*.mat'); %just specify the format correctly
  댓글 수: 3
madhan ravi
madhan ravi 2018년 10월 18일
편집: madhan ravi 2018년 10월 18일
You‘re welcome
Imane AssalHi
Imane AssalHi 2022년 8월 13일
and what about multiple data in multiple folders

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by