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:
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)
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:
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.
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.