I am trying to run an image analysis script on ~5,000 files in Matlab. I'm trying to run the main part of the script inside a for loop and iterate across every file name. I've listed the directory as a a variable and have come up with something like the following:
images = dir
images.name
imagesdim = size(images)
imageslength = imagesdim(1)
for i = 1:imageslength
cimg = imread(images(i,1).name);
etc etc
end
However, this doesn't seem to be an acceptable input argument for imread. Is there any way I can format this list so that I can use a variable here, or will I have to copy this argument 5,000 times?