Reading .dbf files in a for loop by dynamically changing file names

조회 수: 9 (최근 30일)
Damith
Damith 2014년 10월 23일
댓글: Damith 2014년 10월 23일
Hi All,
I need to read multiple (175) .dbf files in a for loop. But file name to be read needs to be dynamically changed. File name changes from polyzone1_1.dbf, polyzone1_2.dbf....polyzone1_175.dbf. The sheet name also needs to be dynamically changed, accordingly.
for i=1:175
data{i}=xlsread('<path>\polyzone1_1.dbf','polyzone1_1','A2:A10')
end
Can somebody suggest me a method or help me to complete the code?
Thanks in advance.

채택된 답변

per isakson
per isakson 2014년 10월 23일
편집: per isakson 2014년 10월 23일
Replace
polyzone1_1.dbf
by
sprintf('polyzone1_%i.dbf', i )
and
'polyzone1_1'
by
sprintf('polyzone1_%i', i )
&nbsp

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by