How can i fix it?

1 Ansicht (letzte 30 Tage)
Ara
Ara am 26 Dez. 2014
Kommentiert: Ara am 26 Dez. 2014
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

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 26 Dez. 2014
Bearbeitet: Azzi Abdelmalek am 26 Dez. 2014
YourFolder='E:\matlab'
for k=1:10
FileName=sprintf('pic%d.jpg',k)
File=fullfile(YourFolder,FileName)
% do
end
  1 Kommentar
Ara
Ara am 26 Dez. 2014
thank youu

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by