slwebview
Export Simulink models to web views
Syntax
Description
slwebview
starts the web view dialog box in the Report
Explorer.
exports all models in a folder. See RecurseFolder to include
models in subfolders.filename
= slwebview(folder
)
provides additional options specified by one or more name-value arguments.filename
= slwebview(sysname
,Name=Value
)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
A web view is an interactive rendition of a model that you can view in a web browser. You can navigate a web view hierarchically to examine specific subsystems and to see properties of blocks and signals.
You can use web views to share models with people who do not have Simulink installed.
Note
When using color to differentiate sample times, only the colors for referenced models are visible in the web view. Colors applied to referenced subsystems are not supported.
To generate a web view when running MATLAB with the
-batch
startup option on Linux® machines:Create a Linux shell file.
In the shell file, store the commands that open the model and generate the web view in a variable. You can enter multiple semicolon-separated commands.
In the shell file, use
xvfb-run
to run MATLAB with the-batch
startup option and execute the commands. For more information aboutxfvb-run
, see xvfb-run on the Ubuntu website.Save the shell file to a directory on the MATLAB path.
In a Linux terminal, navigate to the directory that contains the shell file.
Execute the shell file.
This example code defines a Linux Bash shell that executes
slwebview
for the modelmyModel
.#!/bin/bash MATLAB_COMMANDS="open_system("myModel.slx"); slwebview("myModel.slx");" xvfb-run matlab -batch "$MATLAB_COMMANDS exit;"