index in safe-title
Show older comments
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!
Accepted Answer
More Answers (1)
KSSV
on 6 May 2021
saveas(gcf,[title_t{n},'jpeg'])
4 Comments
Lukas Netzer
on 6 May 2021
Walter Roberson
on 6 May 2021
saveas(gcf,['title_' t{n}],'jpeg'])
Lukas Netzer
on 6 May 2021
Walter Roberson
on 6 May 2021
What datatype is t{n} ? If it is numeric then
filename = sprintf('title_%g.jpg', t{n});
saveas(gcf, filename, 'jpeg')
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!