Im trying to create a loop to get some informations from all the txt files (like row 4 to row 28) and then get all this information together. The question is this code dont read the txt files and i don't know how to add the result together. If someone can help me would be awesome. The files are all on the same directory and the names are like a1.txt to a328.txt.
numFiles = 328;startRow = 4;endRow = 28;myData = cell(1,numFiles);for fileNum = 1:numFiles fileName = sprintf('file%02d.txt',fileNum); myData{fileNum} = importfile(fileName,startRow,endRow);end
Best Answer