How to select one specific file from a folder of same extension

조회 수: 1 (최근 30일)
Odrisso
Odrisso 2016년 11월 2일
답변: dpb 2016년 11월 2일
Hi, I have six files under same folder. They are ACC_1.DAT, ACC_2.DAT, ACC_3.DAT and SN_1.DAT,SN_2.DAT,SN_3.DAT.
I want to develop a code where only SN_''.DAT are selected and stored in a location in matlab.
Please let me know, how can I do it?

채택된 답변

dpb
dpb 2016년 11월 2일
d=dir('SN*.DAT'); % return list of files beginning w/ 'SN'
for i=1:length(d)
% do whatever with each file here...
...
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by