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

Thank Madhan Ravi. Big help.
madhan ravi
madhan ravi 2018년 10월 18일
편집: madhan ravi 2018년 10월 18일
You‘re welcome
and what about multiple data in multiple folders

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2018년 10월 18일

댓글:

2022년 8월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by