필터 지우기
필터 지우기

How to read two different files that are in different folders ?

조회 수: 1 (최근 30일)
bamini thavarajah
bamini thavarajah 2018년 11월 2일
댓글: Image Analyst 2018년 11월 2일
I have 2 different folders. Each has 10 sub-folders and each sub-folder has 10 files. I need to read two files at the same time and that are in different sub-folders. I need matlab code.
example:
I need to read img (1).gif , img (1).mat at the same time. ,`
  댓글 수: 3
Adam
Adam 2018년 11월 2일
What is the problem? Just give the file paths of the two files to whatever file reading/opening instruction you are using and it will work, depending on what you mean by 'read two files at the same time'. If you need them to be actually read in parallel that is another matter entirely.
Image Analyst
Image Analyst 2018년 11월 2일
Did you try just creating the filenames like
f1 = fullfile(folder1, 'img(1).gif')
f2 = fullfile(folder2, 'img(1).gif')
Then do whatever you need to do with them, like call imread() or whatever. A related demo is attached.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by