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일

2 개 추천

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개)

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2018년 2월 27일

댓글:

2020년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by