Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

including a simulink block diagram in a published m-file

116 views
Skip to first unread message

Susan

unread,
Oct 18, 2010, 12:46:03 PM10/18/10
to
I'm publishing an m-file to describe some work and I'd like to include a simulink block diagram in the resulting html file. I've surfed around in the help and on the web but haven't found a way to do this. Can anyone point me in the right direction?

Thank you,

Susan

Arkadiy Turevskiy

unread,
Oct 18, 2010, 2:53:03 PM10/18/10
to
"Susan " <foow...@gmail.com> wrote in message <i9htkb$snc$1...@fred.mathworks.com>...

> I'm publishing an m-file to describe some work and I'd like to include a simulink block diagram in the resulting html file. I've surfed around in the help and on the web but haven't found a way to do this. Can anyone point me in the right direction?
>
> Thank you,
>
> Susan

If I understand your question correctly,then simply insert a cell that opens a model, i.e.,

%% Publish with an image of f14 model
f14

Now publish those two lines and you will have f14 snapshot in your html.

If you need a snapshot of a subsystem, use open_system:

%% Publish with an image of f14/Controller
open_system('f14/Controller')

If you want more control over how to cycle trough the mdel and capture all subsystems. variables, etc, look at Simulink Report Generator:
http://www.mathworks.com/products/SL_reportgenerator/

HTH.
Arkadiy

Susan

unread,
Oct 18, 2010, 3:47:04 PM10/18/10
to
"Arkadiy Turevskiy" <arkadiy....@mathworks.com> wrote in message
> If I understand your question correctly,then simply insert a cell that opens a model, i.e.,
>
> %% Publish with an image of f14 model
> f14
>
> Now publish those two lines and you will have f14 snapshot in your html.
>
> If you need a snapshot of a subsystem, use open_system:
>
> %% Publish with an image of f14/Controller
> open_system('f14/Controller')

Actually, I'd already tried the open_system command. I'm trying to do this with the "publish" command, as opposed to report generator.

Susan

unread,
Oct 18, 2010, 5:24:04 PM10/18/10
to
OK, I've got this figured out, I think. If the block diagram is already open when the open_system() command happens, the image doesn't show up in the published html.

Thanks for your help.

Susan

0 new messages