how to resolve this error?
1 次查看(过去 30 天)
显示 更早的评论
a=imread(imgNameList(i,:));
>> slideshow Index exceeds matrix dimensions.
Error in slideshow (line 14) a=imread(imgNameList(i,:));
0 个评论
采纳的回答
Azzi Abdelmalek
2014-2-1
编辑:Azzi Abdelmalek
2014-2-1
That means the value of i exceeds the number of element in imgNameList . you can check it by typing
size(imgNameList)
disp(i)
更多回答(1 个)
Walter Roberson
2014-2-1
imgNameList = {'images.jpg','images (1).jpg','images (2).jpg','download.jpg','images (4).jpg','images (5).jpg','images (6).jpg','images (7).jpg','eye3.jpg'};
pause on;
for i = 1:length(imgNameList)
a = imread(imgNameList{i});
imshow(a); drawnow; pause(2);
end
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!