change file name on execution
조회 수: 2 (최근 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에서 Image Data에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!