Key Features

  • Automated reporting from MATLAB®
  • Report formatting based on Microsoft® Word and HTML templates
  • Report designer app for creating custom Word, HTML, and PDF reports
  • Selective report generation via logical control-flow components, such as IF, THEN, ELSE, and WHILE
  • API for forms-based Word, PowerPoint®, HTML, and PDF report generation
Example of a richly formatted report. You can control layout with Word or HTML and control data with MATLAB.

Automated Reporting of MATLAB Applications

You can use MATLAB Report Generator™ to create reports for sharing your MATLAB applications and presenting the results of the code. You can create and generate reports in two ways:

  • Interactively, using the Report Explorer app
  • Programmatically, using the DOM (Document Object Model) API

For reports with simple formatting requirements, the interactive approach is a good way to get started creating reports without having to write code. MATLAB Report Generator provides a set of components for content that commonly occurs in MATLAB 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 creating reports with sophisticated formatting requirements. Using the programmatic approach, you can integrate report generation into analysis and testing applications.

By deploying the report in a compiled application, you can automatically generate richly formatted analysis reports.

Explore gallery (2 images)

Formatting Reports Based on Microsoft Word and HTML Templates

You can use Microsoft Word and HTML templates to define the format and layout of reports that MATLAB Report Generator produces. The templates specify regions of fixed text and generated content (blanks). Using a forms-based reporting approach, MATLAB Report Generator can fill in the blanks with content generated from MATLAB. By creating custom templates, you can tailor the report to meet specific formatting requirements, such as adding logos and footnotes, changing page orientation, and defining specific font types and sizes for table headings. You can achieve a high degree of control over the layout and formatting of the report, and specify exactly where your analysis data, figures, MATLAB code, or other results should appear in the report.

The template-driven approach to creating reports works either way you choose to create reports:

  • Interactively, with the Report Explorer app, which enables you to use styles defined in external templates to format text, paragraphs, tables, lists, and other document content
  • Programmatically, via the DOM API, which involves using report objects, such as paragraph objects, to construct a report

When you create reports programmatically using report objects, the same code can work for HTML, Word, PowerPoint, and PDF output. You do not need to add special-case code to handle different kinds of report output.

Designing the layout and format of reports using templates for Microsoft Word or HTML, with content generated from MATLAB.

Dynamic Reporting

MATLAB Report Generator enables you to run MATLAB applications and document the results as they are created. You can also run scripts in MATLAB to preprocess data for your programs, or, postprocess data from a simulation and display the results as graphical plots or numerical values.

Logical and flow-control components in MATLAB Report Generator let you create conditional reports based on the data generated during the report. For example, you can run a script to analyze your data and, if a threshold value is reached, document the results. Alternatively, you can automatically run a new script for additional analysis and then capture the results.

Logical and flow control components in the interactive report designer let you create dynamic reports that can leverage different MATLAB application code depending on the data analyzed at run time.