Running the Same code for Multiple Files in a Folder
조회 수: 7 (최근 30일)
이전 댓글 표시
Is it possible to use the same code for Multiple Files in a Folder and save its output at particular location.
댓글 수: 0
답변 (1개)
Chunru
2021년 6월 17일
Here is a schetch of the solution:
fn = dir('a*.txt'); % obtain the file information 'a*.txt'. make your own modification
for i=1:length(fn) % loop through all the selected files in the folder
filename = fn(i).name;
% Perform any operation depending on the filename
% Save the results anaywhere you like
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Adding custom doc에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!