User`s guide
Add Report Content Using Components
2-7
Specify Report Variables
The magic squares report uses variables defined in the MATLAB workspace to specify
the number and sizes of squares to display and whether to display the variables as tables
of numbers or images of color-coded squares:
• The magicSizeVector variable specifies an array of magic square sizes
• largestDisplayedArray variable specifies the size of the largest magic square to be
displayed as an array of numbers
You could require that a user create these variables in the MATLAB workspace before
running the report. However, a better solution is to let the report itself create the
variables, using the Evaluate MATLAB Expression component.
To use the Evaluate MATLAB Expression component to define the report variables.
1
In the Outline pane on the left, select the root component of the report setup.
2
In the Library pane in the middle, under the MATLAB category, select Evaluate
MATLAB Expression.
3
In the Properties pane on the right, click the icon next to Add component to
current report to insert the Evaluate MATLAB Expression component into the
report.
You cannot edit the component information in the Properties pane until you have
added the component to the report.
In the Outline pane, the Eval component appears under the magic_squares report.