| Contents | Index |
| On this page… |
|---|
This tutorial takes you through the steps required to export a Simulink model to a Web view. If you have a detailed model of your own, you can use it for this example. Otherwise, use the example provided in this section.
There are several ways to create a Simulink model Web view. This tutorial creates a Web view from the Simulink model window using the sldemo_auto_climatecontrol model, which is provided with the Simulink software. This model simulates the working of an automatic climate control system in a car.
You do not need to know the Simulink product to follow this tutorial.
Before creating the Web view, specify export options:
Start a MATLAB software session.
At the command prompt, enter sldemo_auto_climatecontrol to open the Simulink model.
Click File > Export to Web.
A Web view window that includes data about the current model appears.

In the Include systems selection list, select All to export all systems in this model.
In the Look under masks selection list, select Masks with no workspace and no dialog to export only graphically masked blocks.
Leave the Follow library links and Follow model reference blocks check boxes cleared.
Exported Layers appears in the lower part of the Web View window. This area lists the names of the systems to export to the Web view, along with their Simulink paths. Because you selected All in the Include systems selection list, all layers in the sldemo_auto_climatecontrol model appear.
To export the model to a Web view, click OK in the Web View window.
Note Scalable Vector Graphics (SVG) is required for Web views. The screen shots in this tutorial use Microsoft Internet Explorer Web browser with the SVG plug-in installed. Mozilla® Firefox® has native support for SVG. For details on SVG, see Browser Requirements for Web Views. If you do not have an SVG plug-in installed, then a dialog box appears with instructions for installing an SVG plug-in. Complete the installation and click OK in the Web View window. |
The Web view of the model appears in the browser window.

You can navigate Web views in ways similar to how you navigate models in the Simulink GUI. The following steps help you experiment with the types of navigation that are available.
Notice the four navigation icons in the upper-left corner of the browser window.
![]()
Hover over the Navigation Commands icon
to see a list of keyboard
shortcuts that allow you to move around the current window.

Press some of the keyboard keys listed here to see how the model in the Web view reacts.
Hover over the Temperature Control Chart diagram.

The name next to the navigation icons becomes Temperature Control Chart.
![]()
Hover over the System Trigger block.
The name next to the navigation icons changes to System Trigger.
![]()
In addition, the block parameter values for the System Trigger block appear.

Hover over other blocks and subsystems in the model and observe the results.
Click the Temperature Control Chart.
The details of this Stateflow chart appear, and the middle two navigation icons are now enabled:
The View Home icon takes you up to the top level of the model.
The View Previous icon takes you back to the previously displayed level in the model.

Click the setpoint_calc box in the Stateflow chart to see the details of that block.

Click the View home icon to return to the model's top layer.
Click the Show all layers icon. An overall view of the model appears.

This high-level view of the model shows all layers of the model. In this figure, the arrow is hovering over the AC Control layer.
Try opening other Simulink models and exporting them to Web views, and experiment with the results.
![]() | Navigating Web Views | Troubleshooting | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |