change file name on execution
1 次查看(过去 30 天)
显示 更早的评论
urgent help here please... trying to change the file name on this code on each instance of running the function
f=imread('Plate_7.jpg'); % Reading the number plate image file
i want the 'Plate_1' to increment by 1 each time the program runs to 'Plate_2', 'Plate_3'... and so on!
i have tried using a for loop
for k=1:10
file=sprintf('Plate_%d.jpg',k)
f=imread('Plate.jpg'); % Reading the number plate image file
end
but this just lists image 1 up to 10 in the command window...
0 个评论
采纳的回答
Azzi Abdelmalek
2014-4-15
编辑:Azzi Abdelmalek
2014-4-15
for k=1:10
file=sprintf('Plate_%d.jpg',k)
f{k}=imread(file);
end
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!