index in safe-title
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (1)
KSSV
le 6 Mai 2021
saveas(gcf,[title_t{n},'jpeg'])
4 commentaires
Lukas Netzer
le 6 Mai 2021
Walter Roberson
le 6 Mai 2021
saveas(gcf,['title_' t{n}],'jpeg'])
Lukas Netzer
le 6 Mai 2021
Walter Roberson
le 6 Mai 2021
What datatype is t{n} ? If it is numeric then
filename = sprintf('title_%g.jpg', t{n});
saveas(gcf, filename, 'jpeg')
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!