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!

 채택된 답변

madhan ravi
madhan ravi 2018년 12월 21일

0 개 추천

saveas(gcf,sprintf('x%d.jpeg',j));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Performance and Memory에 대해 자세히 알아보기

질문:

2018년 12월 21일

답변:

2018년 12월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by