필터 지우기
필터 지우기

Processing many sequential files

조회 수: 1 (최근 30일)
Pete
Pete 2013년 8월 4일
I am trying to process many many files sequentially. I am using the 'dir' function to get a list of all the files and then using a 'for' loop to process each one. Here's essentially what's happening at the moment. (Note that 'function' is a custom function, and imagine I have 3000 txt files labelled 000000.txt - 002999.txt)
A=dir('*.txt')
j=length(A)
for k=i:j
m=function(A(k).name)
end
So far so good. However I have several 'batches' of 3000 txt files, each labelled the same way. Despite this, I need to 'add' some of the batches together so that they are processed all in the same loop. However I can't just drag the files to the same directory as they will replace the previous ones due to them having the same name. Also, they need to remain in the order they are in, i.e, the first 3000 get processed, followed by the second 3000, all in the same loop. Is there a way around this?
  댓글 수: 2
dpb
dpb 2013년 8월 4일
Post EITHER on forum or newsgroup; not both. Already answered at cs-sm.
Pete
Pete 2013년 8월 4일
ah my bad, thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

dpb
dpb 2013년 8월 4일
See your identical posting on newsgroup.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by