Access different files with the same name in different folders which are named numerically
이전 댓글 표시
I have got data in folders named 1,2,3... and in each folder I have couple of .xls files. the names of the .xls files are same. Eg:1\E300; 2\E300; 3\E300;... I want to write a program so that I am able to retrive the data and perform some calculations instead of reading every data one by one.
답변 (3개)
the cyclist
2012년 7월 14일
One of several ways:
N = 50; % Number of directories
for i = 1:N
filename = [num2str(i),'\E300.xls']
% Do whatever
end
Azzi Abdelmalek
2012년 9월 12일
편집: Azzi Abdelmalek
2012년 9월 12일
for k=1:10
file=sprintf('D:\\%d\\E300',k)
end
카테고리
도움말 센터 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!