필터 지우기
필터 지우기

Import csv files with sequential names

조회 수: 3 (최근 30일)
David du Preez
David du Preez 2018년 2월 14일
편집: Jan 2018년 2월 14일
I have several csv files with the following names:
19660101.Dobson.Beck.089.SAWS
19660201.Dobson.Beck.089.SAWS
19660301.Dobson.Beck.089.SAWS
and so on for an entire year.
I want to import row 25 - 55 and only column A and D. I know it is possible to do one file would like to do all at once.

채택된 답변

Jan
Jan 2018년 2월 14일
편집: Jan 2018년 2월 14일
See FAQ: Import sequence of files . You cannot import "all files at once", but you import one after the other in a loop.
Folder = 'C:\You\Folder';
DirList = dir(fullfile(Folder, '*.SAWS'));
for iFile = 1:numel(DirList)
File = fullfile(Folder, DirList(iFile).Name);
... import the contents of the file and do what you want
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by