How do I save Simlulink model to JPG or any other image formats?
Show older comments
How do I save Simlulink model to JPG or any other image formats?
Accepted Answer
More Answers (3)
Harish Balaga
on 3 Jul 2013
Edited: Harish Balaga
on 3 Jul 2013
as Azzi Abdelmalek said above, print command can be used. And one can directly save it in required fomat in single command. (no need to use imead, imwite commands). Example: use
ModelName % to open the model
print('-sModelName','-dtiff','model.tiff')
to save ModelName.mdl in TIFF format. Image name will be model.tiff
replace -dtiff with -djpeg for saving the model in jpeg format
3 Comments
Nicolas Fernandes
on 20 Nov 2018
I've tried using this command to save in EPS format, but didn't work. Is there a way to increase the figure resolution?
Jérôme
on 13 Feb 2023
print('-sModelName', '-dpng', 'model.png', 'r0') % Screen resolution, same as without parameter
print('-sModelName', '-dpng', 'model.png', 'r300') % Resolution of 300 dots per inch
Instead of 300, you can put what you want.
Bharath
on 30 Aug 2024
Correction in the code add a -before the resolution '-r300'
fathi jamila
on 19 Apr 2020
0 votes
How can i read image SLC by matlab ?
Anil Chowdary Tummala
on 5 Feb 2021
0 votes
You may use this to save simulink model as image with extension .tiff
print('-sModelName','-dtiff','model.tiff')
Categories
Find more on Modeling in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!