What variables should i choose inside the loop?

Suppose I have NN number of images named img1 to imgNN...what variables should I choose to display all the images inside the loop..
NN = 40;
for ii = 1:NN
figure;
imshow(img(NN));
axis on;
end
I tried this but its not working...I am facing trouble choosing the variable..any help is appreciated

 採用された回答

Walter Roberson
Walter Roberson 2015 年 7 月 24 日
編集済み: Walter Roberson 2015 年 7 月 24 日

0 投票

NN = 40;
for ii = 1:NN
figure;
thisimgname = sprintf('img%d.jpg', ii);
img = imread(thisimgname);
imshow(img);
axis on;
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2015 年 7 月 24 日

コメント済み:

2015 年 7 月 25 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by