How to loop 100 txt files through a folder
이전 댓글 표시
Hi, I am completely new to matlab. I need help to load 100 txtfiles from one folder into matlab to extract features. Can I please know the step by step code to use to loop them using batch files?
댓글 수: 2
Bikram Kawan
2015년 7월 16일
matFiles = dir('*.txt');
numfiles = length(txtfiles);
disp(numfiles)
mydata = cell(1, numfiles);
for k = 1:numfiles
mydata{k} = load(matFiles(k).name);
dataset=mydata{1,k};
disp(k)
%You other code to execute in this block
end
jahmunah vicnesh
2015년 7월 17일
답변 (1개)
Azzi Abdelmalek
2015년 7월 16일
0 개 추천
댓글 수: 3
jahmunah vicnesh
2015년 7월 17일
Walter Roberson
2015년 7월 17일
Bikram Kawan's reply shows looping and loading data.
jahmunah vicnesh
2015년 7월 17일
편집: Stephen23
2015년 7월 17일
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!