From: Andy on
"Raghu " <raghunow(a)gmail.com> wrote in message <i4454p$oef$1(a)fred.mathworks.com>...
> I'm trying to open a folder containing image files and read all the files in it. The image files are numbered serially from 1 to 10 i.e. 1.pgm, 2.pgm, 3.pgm etc. Right now I'm manually doing imread() for each image file. Is there a way to make this simpler?
>
> Also there are many folders like these, again numbered from 1 to 40, each containing 10 image files (.pgm).So basically I want to read 40x10=400 image files. How do i handle these?Can i write a piece of code to do this ?

doc dir