Simulink Report Generator
You can build highly customized reports for your models and simulation results using Simulink Report Generator. There are two ways to create and generate reports:
For reports with simple formatting requirements, the interactive approach is a good way to get started with creating reports without having to write code. Simulink Report Generator provides a set of components for content that commonly occurs in Simulink® based reports. Each component specifies an action to be taken in the report, such as evaluating MATLAB® code, creating a table of data variables, or capturing a figure window. You can drag and drop components and modify their attributes to create a report setup that works best for your application.
The programmatic approach is well suited for reports with sophisticated formatting requirements. Using the programmatic approach, you can integrate report generation into analysis and testing applications.
Simulink Report Generator provides predefined, standard reports for capturing detailed information about a system design and its associated requirements. You can use the predefined report setup files as a starting point for creating your own custom reports. The output format can be Word, PDF, HTML, or RTF. Simulink Report Generator lets you automate the process of generating model artifacts and documenting aspects of the Simulink models that are relevant to your application.
With the System Design Description, you can:
Using the API, you can automate the generation of reports from the MATLAB command line.
Simulink Report Generator lets you create web views of your Simulink models that look exactly the same as models viewed in the Simulink editor. A web view is an interactive rendition of a model that you can view in a web browser and share with your colleagues who do not have Simulink installed—royalty free. You can use the model hierarchy to quickly navigate to a specific subsystem and to view properties of blocks, signals, and scopes. You can zoom in and out, pan, and fit to view using the same keyboard shortcuts you use in Simulink. By saving web views of a model over time, you can create snapshots of the development process and review each stage.
You can also capture and display requirements and model coverage information in a web view. These web views use the requirements traceability and coverage information provided by Simulink Verification and Validation™. For example, if you export a web view of a model that has requirements associated with a set of blocks, you will be able to view the requirements associated with the blocks (highlighted in orange) in an informer panel below the model in the HTML browser.
Additionally, you can view the code generated from a model along with its web view within the MATLAB web browser. This report is accessible from within MATLAB; an Embedded Coder® license is required to view it.
To access web views, the browser needs to natively support SVG.
You can use Microsoft Word and HTML templates to define the format and layout of reports that Simulink Report Generator produces. The templates specify regions of fixed text and generated content (blanks). Using a forms-based reporting approach, Simulink Report Generator can fill in the blanks with content generated from MATLAB and Simulink. By creating custom templates, you can tailor the report to meet specific formatting requirements, such as adding logos and footnotes, changing page orientation, or defining specific font types and sizes for table headings. Overall, you can achieve a high degree of control over the layout and formatting of the report, and specify exactly where you intend your simulation data, figures, MATLAB code, or other results to appear in the report.
The template-driven approach to creating reports lets you create reports in several ways:
When you create reports programmatically using report objects, the same code can work for HTML, Word, and PDF output. You do not need to add special-case code to handle different kinds of report output.
Simulink Report Generator lets you compare and merge Simulink models by identifying differences between model elements, Stateflow® charts, and MATLAB Function blocks. The tool uses XML text file representations of the Simulink models for the analysis.
An interactive XML comparison report lets you explore the differences, view the changes highlighted in the original models, and merge differences. A filter mechanism enables you to display the changes you are interested in, providing options to disable or enable nonfunctional changes, block parameter defaults, and changes in line schematics. The tool also produces an HTML report you can use for peer reviews or archiving.
Compare and merge is a useful part of design and verification in Model-Based Design. Simulink Projects, an interactive tool in Simulink for managing your project files, uses the XML comparison feature of Simulink Report Generator to compare and merge content across file revisions.
The XML comparison tool compares the XML text files using the Chawathe algorithm, as described in the paper:
Change Detection in Hierarchically Structured Information, Sudarshan Chawathe, Anand Rajaraman, and Jennifer Widom; SIGMOD Conference, Montreal, Canada, June 1996, pp. 493-504.