How can i fix it?

1 次查看(过去 30 天)
Ara
Ara 2014-12-26
评论: Ara 2014-12-26
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
YourFolder='E:\matlab'
for k=1:10
FileName=sprintf('pic%d.jpg',k)
File=fullfile(YourFolder,FileName)
% do
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by