"Guido de Haan" <guido.dehaan03@gmail.com> wrote in message
news:n6hfer$es3$1@newscl01ah.mathworks.com...
> I need to evaluate the greyscale of several images, I use the command
> "improfile" to do this. Since there are several images that need to be
> evaluated I decided to use a for loop. However I'm having some problem
> with the name recognition of my images. The code I've written is:
>
> cd test
> A=dir('*.bmp'); x = [300,1000];
> y = [512,512] ;
> G = length(A);
> for n=1:G
> eval(['M' num2str(n) '=imread(A(n).name);']);
DON'T DO THIS.
See question 1 in the Programming section of the FAQ for an explanation why
this is a bad idea and alternatives you should use instead.
http://matlab.wikia.com/wiki/FAQ
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com