index in safe-title
Ältere Kommentare anzeigen
I would like to define my file with the title, so that includes the according index. I tried:
saveas(gcf,'title_t{n}','jpeg')
saveas(gcf,'title', t{n},'jpeg')
Either wont work - is there a way?
Thanks in advance!
Akzeptierte Antwort
Weitere Antworten (1)
KSSV
am 6 Mai 2021
saveas(gcf,[title_t{n},'jpeg'])
4 Kommentare
Lukas Netzer
am 6 Mai 2021
Walter Roberson
am 6 Mai 2021
saveas(gcf,['title_' t{n}],'jpeg'])
Lukas Netzer
am 6 Mai 2021
Walter Roberson
am 6 Mai 2021
What datatype is t{n} ? If it is numeric then
filename = sprintf('title_%g.jpg', t{n});
saveas(gcf, filename, 'jpeg')
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!