How do I save my Simulink model as a TIFF or JPEG image?

M
Maximiliano · Sep 16, 2020 · 3.3K views
Question
I would like to save my Simulink model as a TIFF or JPEG image. However, the following code does not apply to Simulink models: print -smodelname -dtiff
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 20, 2026
This enhancement has been incorporated in Release 2006b (R2006b). For previous product releases, read below for any possible workarounds:
The Simulink window is not a traditional MATLAB figure window; therefore, it cannot be directly saved as a TIFF or JPEG image.
As a workaround, you can try the following:
1. Save the model as a metafile or as a bitmap by using the following command:
modelname  %to make the model the current window

Save the model as a meta-file (EMF) by using the following command:

print  -smodelname -dmeta outputfilename

Save the model as a bitmap (BMP) by using the following command:

print -smodelname -dbitmap outputfilename

2. If the file is a Windows meta-file, use another program, such as LviewPro, to open the file and resave it as a TIFF image.

 If the file is a bitmap, use IMREAD to read the bitmap into MATLAB.

A = imread('filename.bmp','bmp')

Then use IMWRITE to save the file as a TIFF image.

imwrite(A,'filename.tif','tif')
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!