Filter löschen
Filter löschen

how to save images in a for loop?

3 Ansichten (letzte 30 Tage)
Sagi
Sagi am 9 Sep. 2014
Kommentiert: Star Strider am 9 Sep. 2014
hey, I wrote a code to save a few images in a for loop in a cirtin folder,it won't work,please help
for beta=-1:1
...
...
...
xx=sprintf('C:\Users\Sagipc\Desktop\ImageLibrary\beta%g.jpg',beta);
imwrite(pic1,xx,'jpg');
end

Akzeptierte Antwort

Star Strider
Star Strider am 9 Sep. 2014
Simply stating the problem as ‘it won’t work’ doesn’t tell us much.
It looks as though it’s writing ‘pic1’ to every file you create. I would assume you intend a different result.
What are your image file names? How would you want to save them?
  5 Kommentare
Sagi
Sagi am 9 Sep. 2014
that was very helpful, thank u heaps!
Star Strider
Star Strider am 9 Sep. 2014
My pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements 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