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

6 ビュー (過去 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 Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by