How to loop 100 txt files through a folder
Mostrar comentarios más antiguos
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 comentarios
Bikram Kawan
el 16 de Jul. de 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
el 17 de Jul. de 2015
Respuestas (1)
Azzi Abdelmalek
el 16 de Jul. de 2015
0 votos
3 comentarios
jahmunah vicnesh
el 17 de Jul. de 2015
Walter Roberson
el 17 de Jul. de 2015
Bikram Kawan's reply shows looping and loading data.
jahmunah vicnesh
el 17 de Jul. de 2015
Editada: Stephen23
el 17 de Jul. de 2015
Categorías
Más información sobre Whos en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!