How to put loop for multiple folders in matlab?

2 views (last 30 days)
I am having 62 folders. I am having 55 number of images in each folder. how should i put loop for multiple folders

Accepted Answer

Adam Danz
Adam Danz on 17 Sep 2018
allFolders = {'C:\Users\Anu\folder1', 'C:\Users\Anu\folder2', 'C:\Users\Anu\folder3'};
for i = 1:length(allFolders)
currentFolder = allFolders{i};
end
  2 Comments
Anu
Anu on 18 Sep 2018
Thank you. but can we put folder1,folder2,... as in the loop, folder(i)??
Adam Danz
Adam Danz on 18 Sep 2018
I don't understand your follow-up question. Can you give an example of what you'd like to do?

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!