how to pass image name dynamically
1 次查看(过去 30 天)
显示 更早的评论
In my code there is 'for loop' and i have to pass image name according to loo
if true
% code
for k=100 to 102
imshow('C:\Users\shraddha\Documents\MATLAB\Snaps\100.png');
end
at '100.png' I want the value of k so i tried a lot but didn't got the solution..please sugest me some solution.
0 个评论
回答(1 个)
Azzi Abdelmalek
2014-11-23
for k=100 to 102
imshow(sprintf('C:\Users\shraddha\Documents\MATLAB\Snaps\%d.png',k));
end
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!