How can i go through a folder with a loop?

1 回表示 (過去 30 日間)
Yagmur Gencoglu
Yagmur Gencoglu 2018 年 2 月 27 日
コメント済み: rebecca wise 2020 年 2 月 3 日
I have a folder full of different csv files. I need to run the same script for each one of them.
How can i do that?
Thanks in advance.

採用された回答

KSSV
KSSV 2018 年 2 月 27 日
files = dir('*.csv') ; % you are in folder of csv files
N = length(files) ; % total number of files
% loop for each file
for i = 1:N
thisfile = files(i).name ;
% do what you want
end
  1 件のコメント
rebecca wise
rebecca wise 2020 年 2 月 3 日
How would I then direct matlab to calculate the mean of the same column and sheet of all files?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by