주요 콘텐츠

Embedded Web View Reports

R2026b

What Is Embedded Web View?

Embedded Web View is a MATLAB® application programming interface (API) that allows you to create HTML reports containing Web Views. Embedded Web View lets you generate compact and navigable reports from Simulink® models. For example, the following image shows a control system calibration guide generated by a MATLAB program based on Embedded Web View.

Control system calibration guide. Table of contents appears in the left navigation pane, calibration guide contents display in the center document pane, and the Simulink model diagram with parameter attributes appear in the right Web View pane.

An Embedded Web View report has three hyperlinked panes:

NameLocationContent
Navigation paneLeft paneReport table of contents
Document paneCenter paneReport content
Web View paneRight paneWeb view of the Simulink model

Use the MATLAB Report Generator™ DOM and Report APIs and the Simulink Report Generator Report APIs to generate the calibration guide content. Use the Embedded Web View API to create the report. The report is a user interface with guide content, an embedded Web View, and hyperlinks between the Web View and the guide report text. The resulting guide runs in any standard browser without requiring either MATLAB or Simulink.

Navigate Through Embedded Web View Reports

The Embedded Web View API facilitates report navigation by letting you create two-way hyperlinks between report content and the embedded Web View. The hyperlinks are illustrated in the following calibration guide example.

Navigate Via a Table of Contents

The Embedded Web View API creates a table of contents (TOC) based on your report section headings. Clicking a TOC heading entry displays the corresponding report section in the document pane. It also displays and flashes the corresponding model element. The linked model block in this calibration guide example is shown highlighted in yellow in the Web View pane.

Table of contents appears in the left navigation pane, report contents display in the center document pane with the linked model highlighted in yellow, and the Simulink model diagram with parameter attributes appear in the right Web View pane.

Navigate Via Contents

This calibration guide has hyperlinks from any text element in the content to any model element in the Web View pane. Clicking the text element in the contents displays and flashes the corresponding model element. The linked model block in this calibration report example is shown highlighted in yellow in the Web View pane.

Table of contents appears in the left navigation pane, report contents display in the center document pane, and the Simulink model diagram with parameter attributes appear in the right Web View pane, with linked model block highlighted in yellow.

Navigate Via Web View

This calibration guide has hyperlinks from any element in the Web View pane to any location in the document pane. Clicking the model element displays the corresponding location in the document pane as shown highlighted in this calibration guide example.

Table of contents appears in the left navigation pane, report contents display in the center document pane, and the Simulink model diagram with parameter attributes appear in the right Web View pane. Selected model element in the right Web View pane highlights the corresponding text in the center document pane.

Embedded Web View Packaging

The Embedded Web View API generates a report as a package of HTML, image, style sheet, JavaScript®, and JavaScript Object Notation (JSON) files organized into folders. By default, the API produces both zipped and unzipped versions of a report package in the current MATLAB folder.

View Embedded Web View Reports

If MATLAB Report Generator is installed on your system, you can use the report generator rptview function to view a zipped or unzipped Embedded Web View.

To view an Embedded Web View report on systems that do not have MATLAB installed,

  1. Unzip the report in an empty, writable folder on your system. This step creates a file named webview.html in the folder and a subfolder containing supporting files.

  2. Open webview.html in a browser to view the report.

See Also

Topics