MATLAB: How to name a section in a chapter based on the variable value in MATLAB Report Generator

customexplorergeneratorMATLAB Report Generatorreportvariable

In MATLAB Report generator, I want to name a section/chapter based on a variable name.

Best Answer

The syntax for giving custom title to a chapter/section in a report is as below:
%<VariableName>
where VariableName is the name of the variable.
The detailed steps are as below:
1. In the Report explorer outline pane (leftmost of the three panes), click on the chapter or section that needs to be custom named.
2. The properties pane (rightmost pane among the three), will show the properties for Chapter/ Section. Under 'Title' properties, click on the drop-down menu to select 'Custom', and type " %<VariableName> " (without the quotes) in the text box.