Extracting data from multiple files with header.
이전 댓글 표시
I have a program for extracting numeric data from single text file, but I don't know how to use for loop for extracting numeric data from multiple files at one go. This data seperated by space. Below is my code for single <file:->
clear all
numFiles = 1302;
startRow = 44;
endRow = inf;
myData = cell(1,numFiles);
for fileNum = 1:numFiles
fid = fopen('20030215401v0200s.n2o', 'rt');
Data = textscan(fid, '%f %f %f %f %f', 'headerLines', 43, 'CollectOutput', true);
fclose(fid);
Data= cell2mat( Data);
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!