Assignment syntax on LHS of expression
조회 수: 1 (최근 30일)
이전 댓글 표시
I asked a similar question before about batch processing of files. However, it seems like Matlab’s built in functionality for this won’t work in my situation because the files are not sequentially numbered. If one file is open, I would do:
[filename1, filepath1]=uigetfile…
For 2 files:
[filename1, filepath1]=uigetfile…
[filename2, filepath2]=uigetfile…
To automate this, the user specifies how many files will be opened in a dialog box (answer stored as i).
I am trying to use a while loop:
j=1;
while i~=0
n=num2str(i);
[strcat(‘filename’,n), strcat(‘filepath’,n)]=uigetfile…
j=j+1;
i=i-1;
However, this is not the correct syntax, but it illustrates what I am going for. I need to do it this way so I can preserve the actual file names for use in data labeling.
댓글 수: 0
채택된 답변
Walter Roberson
2011년 10월 18일
To make this clearer:
for K = 1 : i
[filename{K}, filepath{K}] = uigetfile(....)
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!