User`s guide
Add Report Content Using Components
2-9
%This MATLAB code sets up two variables
%that define how the report runs.
%magicSizeVector is a list of MxM
%Magic Square sizes to insert into
%the report. Note that magic
%squares cannot be 2x2.
magicSizeVector=[4 8 16 32];
%largestDisplayedArray sets the
%limit of array size that will be
%inserted into the report with the
%Insert Variable component.
largestDisplayedArray=15;
6
In the Evaluate this expression if there is an error text box, replace the existing
text with the following text.
disp(['Error during eval: ', evalException.message])
This causes an error to display if the MATLAB code fails.
Tip To execute these commands immediately, in the top right corner of the Report
Explorer, click the Eval Now button. This confirms that your commands are correct,
to reduce the chances of report generation problems.
7
Save the report. Select File > Save.
Create a Title Page
Note: This section builds on the previous tasks described in the step-by-step example
summarized in “Create a MATLAB Report” on page 2-2.
If you have not completed the previous sections of this example, see open the completed
report setup file: Magic Squares Report.
To create a title page for the report, use the Title Page component.