filename of function print
1 次查看(过去 30 天)
显示 更早的评论
Hello Guys,
I am using the print function for creating eps files for my bachelor thesis.
print('filename' ,'-painters','-depsc', '-r300')
I have the following problem. The filenames of my diagrams are different depending on the experiment. I found out how to use the string function to create names for my diagrams by my inputs. And I am trying the same here.
For example:
name = string({'growthcurve'});
Now Matlab use name for the generation of the diagram title 'growthcurve'.
Is it possible to say the print function also that it should use the variable 'name' to name the file 'growthcurve'. Like print(name ,'-painters','-depsc', '-r300') and the filename then is growthcurve.eps?
Sorry for my english :)
Best wishes
Dennis
5 个评论
Rik
2017-3-9
Hmm. The error tree suggests that the print function interprets nameCurve as a handle, which it isn't. Do you really need the interpreter do be set to '-painters'? Otherwise you might give it a try without that switch.
采纳的回答
Thorsten
2017-3-9
medium = 'XYZ';
replica = 'Replica1';
nameCurve = ['growthcurve', medium, ' ', replica];
nameSemlog = ['semilogy growthcurve', medium, ' ', replica];
print(nameCurve, '-painters', '-depsc', '-r300')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!