index in safe-title
이전 댓글 표시
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!
채택된 답변
추가 답변 (1개)
KSSV
2021년 5월 6일
saveas(gcf,[title_t{n},'jpeg'])
댓글 수: 4
Lukas Netzer
2021년 5월 6일
Walter Roberson
2021년 5월 6일
saveas(gcf,['title_' t{n}],'jpeg'])
Lukas Netzer
2021년 5월 6일
Walter Roberson
2021년 5월 6일
What datatype is t{n} ? If it is numeric then
filename = sprintf('title_%g.jpg', t{n});
saveas(gcf, filename, 'jpeg')
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!