Variable string as filename using export_fig
Show older comments
I want to save multiple figures in one pdf using export_fig. The name for the pdf-file depends on the file to be analysed, e.g. if I have a file called Erica.csv, the output pdf-file should be called Erica.pdf.
I allready have a code for extracting the correct string:
figname=(strcat(all_files(file_no).name(1:end-4),'.pdf'));
When I wanted to use export_fig, I tried:
export_fig figname -transparent -append
However, this creates a pdf-file called 'figname.pdf', while I want it to be called for example 'Erica.pdf'
I also tried:
export_fig (figname -transparent -append) or export_fig (figname) -transparent -append
But in this case an error occurs:
Undefined function or variable 'transparent'.
How can I solve this?
Thanks!
Vincent
Accepted Answer
More Answers (0)
Categories
Find more on Desktop 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!