So i wanted a dynamic way to read 3 files from these folders with extensions .w1 , .w2 and .hdr into variables.

4 ビュー (過去 30 日間)
CalebJones
CalebJones 2019 年 8 月 24 日
回答済み: Abhisek Pradhan 2019 年 8 月 27 日

回答 (1 件)

Abhisek Pradhan
Abhisek Pradhan 2019 年 8 月 27 日
One possible way is to store all the targeted folders inside the directory in a variable using dir function. Loop in each folder using the variable to get the desired files.
To get the files of desired extension use fullfile function.
Refer the following link for more help:

Community Treasure Hunt

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

Start Hunting!

Translated by