Filter löschen
Filter löschen

How to use %s

8 Ansichten (letzte 30 Tage)
Emanuele Mele
Emanuele Mele am 21 Dez. 2018
Beantwortet: madhan ravi am 21 Dez. 2018
Hi all!
I would like to avoid saving the file with the .tif in the name when I use %s during a loop
Here is the code I'm using
baseFileName = tifFiles(j).name;
saveas(gcf,sprintf('%s(%d) .jpeg',baseFileName, j));
Result
input x.tif ---> save x.tif(number).jpeg
what i want is
input x.tif ---> save x.jpeg
thank you!

Akzeptierte Antwort

madhan ravi
madhan ravi am 21 Dez. 2018
saveas(gcf,sprintf('x%d.jpeg',j));

Weitere Antworten (0)

Kategorien

Mehr zu File Operations 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