フィルターのクリア

How to use %s

8 ビュー (過去 30 日間)
Emanuele Mele
Emanuele Mele 2018 年 12 月 21 日
回答済み: madhan ravi 2018 年 12 月 21 日
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 日
saveas(gcf,sprintf('x%d.jpeg',j));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by