coder.report.generate
Generate HTML code generation report
Syntax
Description
coder.report.generate(
generates
a code generation report for the model
)model
. The build
folder for the model must be present in the current working folder.
coder.report.generate(
generates
the code generation report for the subsystem
)subsystem
.
The build folder for the subsystem must be present in the current
working folder.
coder.report.generate(
generates
the code generation report using the current model configuration and
additional options specified by one or more model
,Name,Value
)Name,Value
pair
arguments. Possible values for the Name,Value
arguments
are parameters on the Code Generation > Report pane.
Without modifying the model configuration, using the Name,Value
arguments
you can generate a report with a different report configuration.
Examples
Generate Code Generation Report for Model
Open the model CounterModel
.
openExample('CounterModel.slx')
Build the model. The model is configured to create and open a code generation report.
slbuild('CounterModel');
Close the code generation report.
coder.report.close;
Generate a code generation report.
coder.report.generate('CounterModel');
Generate Code Generation Report for Subsystem
Open the model CounterModel
.
openExample('CounterModel.slx')
Build the subsystem. The model is configured to create and open a code generation report.
slbuild('CounterModel/Amplifier');
Close the code generation report.
coder.report.close;
Generate a code generation report for the subsystem.
coder.report.generate('CounterModel/Amplifier');
Generate Code Generation Report to Include Static Code Metrics Report
Generate a code generation report to include a static code metrics report after the build process, without modifying the model.
Open the model RollAxisAutopilot
.
model = 'RollAxisAutopilot'; openExample('ecoder/TraceGeneratedCodeToBlocksExample','supportingFile',model)
Build the model. The model is configured to create and open a code generation report.
slbuild(model);
Close the code generation report.
coder.report.close;
Generate a code generation report that includes the static code metrics report.
coder.report.generate(model,... 'GenerateCodeMetricsReport','on');
The code generation report opens. In the left navigation pane, click Static Code Metrics Report to view the report.
Input Arguments
model
— Model name
character vector
Model name specified as a character vector
Example: ‘CounterModel
’
Data Types: char
subsystem
— Subsystem name
character vector
Subsystem name specified as a character vector
Example: ‘CounterModel/Amplifier
’
Data Types: char
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'GenerateWebview','on','GenerateCodeMetricsReport','on'
includes
a model Web view and static code metrics in the code generation report.
Each Name,Value
argument corresponds to
a parameter on the Configuration Parameters Code Generation
> Report pane. When the configuration parameter GenerateReport
is on
,
the parameters are enabled. The Name,Value
arguments
are used only for generating the current report. The arguments will
override, but not modify, the parameters in the model configuration.
The following parameters require an Embedded Coder® license.
IncludeHyperlinkInReport
— Code-to-model hyperlinks
‘off
’ | ‘on
’
Code-to-model hyperlinks, specified as ‘on
’
or ‘off
’. Specify ‘on
’
to include code-to-model hyperlinks in the code generation report.
The hyperlinks link code to the corresponding blocks, Stateflow® objects,
and MATLAB® functions in the model diagram. For more information
see Code-to-model.
Example: ‘'IncludeHyperlinkInReport','on'
’
Data Types: char
GenerateTraceInfo
— Model-to-code highlighting
‘off
’ | ‘on
’
Model-to-code highlighting, specified as ‘on
’
or ‘off
’. Specify ‘on
’
to include model-to-code highlighting in the code generation report.
For more information see Model-to-code.
Example: ‘'GenerateTraceInfo','on'
’
Data Types: char
GenerateWebview
— Model Web view
‘off
’ | ‘on
’
Model Web view, specified as ‘on
’ or ‘off
’. Specify
‘on
’ to include the model Web view in the code
generation report. For more information, see Generate model Web view.
Example: ‘'GenerateWebview','on'
’
Data Types: char
GenerateTraceReport
— Summary of eliminated and virtual blocks
‘off
’ | ‘on
’
Summary of eliminated and virtual blocks, specified as ‘on
’
or ‘off
’. Specify ‘on
’
to include a summary of eliminated and virtual blocks in the code
generation report. For more information, see Eliminated / virtual blocks.
Example: ‘'GenerateTraceReport','on'
’
Data Types: char
GenerateTraceReportSl
— Summary of Simulink blocks and the corresponding code location
‘off
’ | ‘on
’
Summary of the Simulink blocks and the corresponding code location,
specified as ‘on
’ or ‘off
’.
Specify ‘on
’ to include a summary
of the Simulink blocks and the corresponding code location in the
code generation report. For more information, see Traceable Simulink blocks.
Example: ‘'GenerateTraceReportSl','on'
’
Data Types: char
GenerateTraceReportsSf
— Summary of Stateflow objects and the corresponding code location
‘off
’ | ‘on
’
Summary of the Stateflow objects and the corresponding code
location, specified as ‘on
’ or ‘off
’.
Specify ‘on
’ to include a summary
of Stateflow objects and the corresponding code location in the code
generation report. For more information, see Traceable Stateflow objects.
Example: ‘'GenerateTraceReportSf','on'
’
Data Types: char
GenerateTraceReportEml
— Summary of MATLAB functions and the corresponding code location
‘off
’ | ‘on
’
Summary of the MATLAB functions and the corresponding code location,
specified as ‘on
’ or ‘off
’.
Specify ‘on
’ to include a summary
of the MATLAB objects and the corresponding code location in the code
generation report. For more information, see Traceable MATLAB functions.
Example: ‘'GenerateTraceReportEml','on'
’
Data Types: char
GenerateCodeMetricsReport
— Static code metrics
‘off
’ | ‘on
’
Static code metrics, specified as ‘on
’ or ‘off
’. Specify
‘on
’ to include static code metrics in the code
generation report. For more information, see Generate static code metrics.
Example: ‘'GenerateCodeMetricsReport','on'
’
Data Types: char
Version History
Introduced in R2012a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)