How to open several txt files?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everyone,
thank you in advance for the help. I would like to open several text files (loop) named by the following: RDLm_RABG_2017_07_01_0000.ruv
RDLm_RABG_2017_07_01_0100.ruv
RDLm_RABG_2017_07_01_0300.ruv . . . etc
then how to read them and extract the information all have the same header and the parameters to extract ( let's say the first 3 column)
thank you once again.
댓글 수: 0
채택된 답변
KSSV
2017년 8월 13일
files = dir('*.txt');
nfiles = length(files);
data = cell(nfiles,1);
for i = 1 : nfiles
fid = fopen(files(i).name);
% read data
fclose(fid);
end
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!