MATLAB: Include Simulink model Image when publishing an mfile

MATLABmfilepublishsimulink

I Have an mfile where i read data from a simulink model and i plot them. I want to publish the results in html, but i also want the simulink model to be displayed (as an image), not just the plots. How should i do it? The mfile is as follows:
%% The results of the simulation of the above model
plot(x,y)
figure;plot(x,z)
figure;plot(y,z)
I can of course take a snapshot and use a command to display it, but I want a more elegant way.

Best Answer

The MATLAB print command provides the option for printing Simulink models. For an overview of how to do this in Simulink, refer to Print and Export Models.
Since you are planning to do this from a script, take a look at print from the MATLAB Command Line.