Generate report from specified Simulink system


report (filename,...)
report (___,-oOPATH)
report (___,-fFORMAT)
report (___,-genOption1,...)
[report1, report2, ...] = report (rptfile1, rptfile2, ...)


  • report with no arguments opens the Report Explorer. For more information on the Report Explorer, see Working with the Report Explorer

  • report (filename,...) generates a report from the specified report setup files. You can specify one or more report setup files. When specifying the name of the report setup file, omit the .rpt file name extension.

  • report (___,-oOPATH) sets the name of the generated report. You can specify a path or a single file name for the OPATH path argument.

  • report (___,-fFORMAT) sets the output format and file name extension of the generated report. Supported formats include:

    • Adobe® Acrobat® PDF (.pdf)

    • HTML (.html)

    • Microsoft® Word (.doc)

    • Rich Text format (.rtf)

    For example, report(‘simple-report','-fPDF) generates a PDF file.

  • report (___,-genOption1,...) specifies one or more of the following report generation options:

    • -noview — Prevents launching the file viewer

    • -graphical — Shows hierarchy in Report Explorer

    • -debug — Enables debug mode

    • -quiet — Sets error echo level to 0

    • -sSTYLESHEETNAME — Sets stylesheet name (not required when choosing format)

  • [report1, report2, ...] = report (rptfile1, rptfile2, ...) returns the names of the generated reports. If the MATLAB® Report Generator™ software cannot generate a given report, its returned name is empty.


Example 1: Setting the format of the generated report

  • Generate the report testrpt in PDF format:

    report testrpt -fpdf

  • Generate the report testrpt in RTF format:

    report testrpt -frtf
  • Generate the report testrpt in Microsoft Word format:

    report testrpt -fdoc

      Note:   Only Microsoft Windows® platforms support this option.

  • Generate a multipage HTML report from the figloop-tutorial report setup file:

    report figloop-tutorial -fhtml -shtml-!MultiPage

Example 2: Specifying the file and path of the generated report

Generate a report named simple-report in the folder /tmp/index.html:

report ('simple-report','-o/tmp/index.html')

Was this topic helpful?