How to loop 100 txt files through a folder
Ältere Kommentare anzeigen
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 Kommentare
Bikram Kawan
am 16 Jul. 2015
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
am 17 Jul. 2015
Antworten (1)
Azzi Abdelmalek
am 16 Jul. 2015
0 Stimmen
3 Kommentare
jahmunah vicnesh
am 17 Jul. 2015
Walter Roberson
am 17 Jul. 2015
Bikram Kawan's reply shows looping and loading data.
jahmunah vicnesh
am 17 Jul. 2015
Bearbeitet: Stephen23
am 17 Jul. 2015
Kategorien
Mehr zu Whos finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!