I need to read 40 .jpeg images from a directory but can't quite figure it out how to do it. I have tried the following code:
A=dir('myDir');for n=1:length(A)eval(['M' num2str(n) '=imread(A(n).name);']);end
I get the following error message when running the code above: Error using imread (line 370) Can't open file "." for reading; you may not have read permission.
Best Answer