File Exchange

image thumbnail

Export a complete simulink diagram

version 1.0.0.0 (1.9 KB) by Kristian
This function exports an image for every subsystem in your model. Eps, png, etc

6 Downloads

Updated 20 Mar 2012

View License

This function goes through your model, and exports every subsystem to a separate image. This is very handy when writing reports, you can have your script update your figures-folder for your TeX file automatically.

It can also be used together with the "LaTeX publish" option in Matlab.

When the second argument is 1 (boolean true), the function generates a file called simulink_images.m, which includes your images for you. Just run this file at the end of the file your wish to publish.

Hope somebody else find this useful, comments are appreciated

Cite As

Kristian (2021). Export a complete simulink diagram (https://www.mathworks.com/matlabcentral/fileexchange/35751-export-a-complete-simulink-diagram), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Damilare Samuel

I wouldn't mind if someone can help with a step by step usage of function.

Anup

Do not specify extension while running the script.

Muhammad Saim

I'm having a same problem as mentioned in the previous comments, but the solution is not mentioned.

Error using print_simulink (line 30)
Error in specification of object or property name and value pairs

I'm using windows 7 with Matlab version R2011b

Daniel Armyr

My bad. Works now :D

Kristian

Hello, thanks for your reply!

I can't seem to reproduce your error.
I downloaded this file, created a simple .mdl file, and executed my script with print_simulink('myModel'); The images where exported as expected.

What system are you on (win, *nix), and which Matlab Version?

I hope we can get it working for you :)

Daniel Armyr

Oh, the error was on line 30. Forgot to say that.

Daniel Armyr

Tried to use this very nifty function, but I get an error. I have a model called temp.mdl. I run your function like so:
>>find_system( 'temp.mdl' )
And I get the following error:
"Error in specification of object or property name and value pairs"

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!