saving a figure as .png with name of a parameter
1 次查看(过去 30 天)
显示 更早的评论
Hallo everyone, I am trying to save a fig as an image (.png) but I want the .png file to have a specific name of one parameter. For exapmle, I have created the str called "name"
name=strcat('quicklook_',dd, '/', mm, '/', yyyy);
and I am trying to save it with the following command
print(name,'-dpng','-r300')
but it doesn't work.
Any ideas?
2 个评论
Rik
2018-6-25
What do you mean with doesn't work? Do you get an error? You are aware that slashes in filenames generally result in folders being created?
采纳的回答
ES
2018-6-25
You cant have "/" in your file names. Can you be happy with say
name=strcat('quicklook_',dd, '_', mm, '_', yyyy);
?
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!