if i looping create some pictures and i want to name it from number of loop. my loop start from index=1
and I want to write image imwrite(subimage{index},'\newimage\pic',index,'.jpg');
but it got error, how can i make my filename to be pic1.jpg and so on.
Thank you

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 26 日
編集済み: Azzi Abdelmalek 2014 年 12 月 26 日

0 投票

YourFolder='E:\matlab'
for k=1:10
FileName=sprintf('pic%d.jpg',k)
File=fullfile(YourFolder,FileName)
% do
end

1 件のコメント

Ara
Ara 2014 年 12 月 26 日
thank youu

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

Ara
2014 年 12 月 26 日

コメント済み:

Ara
2014 年 12 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by