How to put loop for multiple folders in matlab?

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

allFolders = {'C:\Users\Anu\folder1', 'C:\Users\Anu\folder2', 'C:\Users\Anu\folder3'};
for i = 1:length(allFolders)
currentFolder = allFolders{i};
end

2 Comments

Thank you. but can we put folder1,folder2,... as in the loop, folder(i)??
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 Loops and Conditional Statements in Help Center and File Exchange

Tags

Asked:

Anu
on 17 Sep 2018

Commented:

on 18 Sep 2018

Community Treasure Hunt

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

Start Hunting!