Create Simulink Report Generator Reports Interactively
This example shows how to use the Report Explorer to design a report setup file and generate a report that does the following:
Opens a Simulink® model for the van der Pol equation, called the
slrgex_vdp
model.Sets the Gain parameter for the Mu block to five different values.
Simulates the model each time the Gain parameter is set.
Collects the results. Results that fall within a specified range appear in a table in the generated report.
You do not need to know MATLAB® or Simulink software to create and run this example report. However, knowledge of these products will help you understand the MATLAB code and model simulation that executes.
Run the following command to access the supporting files used in this example.
openExample('rptgenext/SimulinkReportGeneratorFilesExample');
To create this report, you perform these main tasks:
This example includes separate sections for different kinds of report creation and
generation task. Each section builds on the previous sections. However, if you want to see the
report setup components for a later section without doing the previous sections, in
MATLAB you can view the completed report setup file by opening the
simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
The report is for the slrgex_vdp
model.
Specify Report Options in Setup Files
To create and configure the report setup file:
Start Simulink.
Open the Report Explorer from the Simulink Toolstrip. On the Apps tab, in the Simulation Graphics and Reporting section, click Report Generator.
Select File > New to create a report setup file.
Save the report setup file.
In the Properties pane:
Specify where to save the report setup file. To save it in the current working folder, select
Present Working Directory
from the Directory selection list.Specify the report format. In the File format selection list, select
Acrobat (PDF)
.Tip
In your reports, if you want to include hyperlinks in system snapshots, use
Direct PDF (from template)
file format.Enter a description for the report. In the Report description text box, replace the existing contents with the following text.
Tip
Copy and paste this code from the HTML documentation into the Report Explorer.
Simulink Dynamic Report This report opens up a model, sets a block parameter several times, simulates the model, and collects the results. Results that fall within a specified range are displayed in a table after the test is complete. The report is configured to test the slrgex_vdp model only. By selecting the Eval String component immediately below the Report component, you can modify * model * block * parameter * tested values
Click File > Save As to save the report setup file as
simulink_tutorial.rpt
.The Outline pane on the left displays the new file name.
To create the content for the report, see Add Report Content with Components.
Add Report Content with Components
Report Components
Report components specify what information to include in the report. Components are self-contained, modular MATLAB objects that control the report-generation process and insert elements, such as tables, lists, and figures, into a report setup file. Use components to customize the appearance and output of reports.
For more information, see Report Components.
The following figure shows a sample page from the report you create in this example, and which components you use to produce this output.
Note
Do not deactivate report components that you add to the report setup file.
Add MATLAB Code
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.The first component to add is the Evaluate MATLAB Expression component, which evaluates MATLAB commands in the workspace. The code in this component assigns initial values to variables used in this example.
In the Outline pane on the left, select
simulink_tutorial.rpt
.In the Library pane in the middle, under the MATLAB category, select Evaluate MATLAB Expression.
In the Properties pane on the right, click the icon next to Add component to current report to insert the component into the report.
Note
You cannot edit the component information in the Properties pane on the right until you add the component to the report.
In the Outline pane on the left, the Evaluate MATLAB Expression component appears under the
simulink_tutorial
report setup file. The Simulink Report Generator™ software abbreviates the component name to Eval.The icon in the upper left corner of the Eval component icon indicates that this component cannot have child components. By default, any components you add while the Eval component is selected are siblings of this component.
The options for the Evaluate MATLAB Expression component appear in the Properties pane on the right.
Clear the Insert MATLAB expression in report and the Display command window output in report check boxes so you do not include MATLAB code or output in this report.
Add MATLAB code to the Expression to evaluate in the base workspace text box to specify the following values:
The model name
The block name
The block parameter
Parameter values
Other initial values required for processing the
slrgex_vdp
model
Replace the existing text with the following MATLAB code.
%The name of the model %which will be changed expModel='slrgex_vdp'; %The name of the block in the model %which will be changed expBlock='slrgex_vdp/Mu'; %The name of the block parameter %which will be changed expParam='Gain'; %The values which will be set %during experimentation. expValue=[-1 0 .5 1 2]; %expValue can be either a vector %or a cell array testMin=2.1; testMax=3; %---- do not change code below line --- try open_system(expModel); end expOkValues=cell(0,2);
Note
When you change a field in the Properties pane on the right, the field background changes color (the default is a cream color), indicating that there are unapplied changes to that field. As soon as you perform operations on another component, the Simulink Report Generator software applies the changes, and the background color becomes white again.
Select the Evaluate this expression if there is an error check box.
In the field under the check box, replace the existing text with the following text:
The Report Explorer window now looks as follows.disp(['Error during eval: ', evalException.message])
Tip
To run the commands that you specified in your MATLAB expression, click the Eval Now button. This button is located at the upper-right corner of the Report Explorer. This is an easy way to ensure that your commands are correct and will not cause report generation problems.
Click File > Save to save the report setup file.
For information about handling error conditions, see Error Handling for MATLAB Code.
Add a Title Page
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Create a custom title page for your report using the Title Page component.
In the Outline pane on the left, select the Eval component.
In the Library pane in the middle, under the Formatting category, click Title Page.
Click the icon next to Add component to current report.
The Title Page component appears in the Outline pane.
Note
To use the Title Page component, you need to have a Chapter component in your report. You have not yet added a Chapter component, so the Properties pane displays a message indicating that chapters are required for the Title Page component to appear correctly. Because later in this example you add Chapter components to this report, you can ignore that message.
In the Properties pane on the right:
In the Title text box, enter:
Dynamic Simulink Report
In the Subtitle text box, enter:
Using Simulink Report Generator to Document Changes
In the Options section, choose
Custom Author
from the selection list.Enter your name in the text box.
Select the Include report creation date check box.
Select the default date and time format from the selection list. The Properties pane on the right looks as follows.
Save the report setup file.
Open the Simulink Model
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.The following statement in the Evaluate MATLAB Expression
component that you created in Add MATLAB Code tries to open the
slrgex_vdp
model:
try open_system(expModel); end
Tip
Select the Eval component in the Outline pane on the left to look at this code again.
To see if the slrgex_vdp
model was successfully opened, test
the result of the open_system
command using a Logical
If component.
In the Outline pane on the left, select the Title Page component.
In the Library pane in the middle, under the Logical and Flow Control category, select Logical If. This component checks to see if a given condition is true or false; in this case, if the model opened successfully.
In the Properties pane on the right, click the icon next to Add component to current report. The Logical If component appears as if in the Outline pane.
These components are child components of the report and siblings of one another. Components can have parent, child, and sibling relationships.
This component can have child components. Add Logical Then and Logical Else Components explains how to add two child components to the if component.
In the Properties pane on the right, in the Test expression text box, replace the default text,
true
, with the following text:Thestrcmp(bdroot(gcs),expModel)
strcmp
function compares the name of the open Simulink model and the value ofexpModel
, which was set to'slrgex_vdp'
. It tests to see if theslrgex_vdp
model opened successfully.strcmp
returns1
(true
) if the two strings match, and0
(false
) if not.Save the report setup file.
The if component name in the Outline pane changes to include the expression that you added.
Add Logical Then and Logical Else Components
Note
This section builds on the previous tasks.
To see the completed report setup file, open the
simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.The if strcmp(bdroot(gcs), expModel)
component has two possible
results. Add two child components to the report setup file to process these cases.
In the Outline pane on the left, select the if component.
In the Library pane in the middle, under the Logical and Flow Control category, double-click Logical Then.
In the Outline pane on the left, select the if component again.
In the Library pane in the middle, under the Logical and Flow Control category, double-click Logical Else.
Both elements are added as child components to the if component, as shown in the Outline pane.
To move the else component under the then component, select the else component and click the down arrow on the toolbar once. The Outline pane on the left looks as follows.
Save the report setup file.
Error If Model Cannot Be Opened
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.If the if strcmp(bdroot(gcs), expModel)
component fails (the
slrgex_vdp
model cannot open), the else
component executes. Display an error message in the report using the
Chapter/Subsection
component.
In the Outline pane on the left, select the else component.
In the Library pane in the middle, under the Formatting category, double-click Chapter/Subsection to add it as a child of the else component. This component displays an error message if an error occurs when opening the
slrgex_vdp
model.Note
When you add a component to a report, it is added by default as a child component unless the selected component cannot have child components.
In the Properties pane on the right, choose
Custom
from the Title selection list, and then enter the following text in the text box:Load Model Failed.
Save the report file.
The Outline pane looks as follows.
In the Outline pane on the left, select the Chapter component.
In the Library pane in the middle, under Formatting, double-click Paragraph.
In the Properties pane on the right, enter the following text in the Paragraph Text text box to display the following error message:
The expressionError: Model %<expModel> could not be opened.
%<expModel>
indicates that the value of the workspace variableexpModel
is inserted into the text, as in the following example.Error: Model slrgex_vdp could not be opened.
In the Outline pane on the left, select the Chapter.
Save the report setup file.
The Outline pane looks as follows.
Create the Body of the Report
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Creating the body of the report involves setting up components and code for dynamic execution of report components. In this example, you perform the following tasks:
Each action requires a separate component under the then component. For information about the then component in this report, see Add Logical Then and Logical Else Components.
Process with a Model Loop Component
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.The report changes the Gain parameter for the Mu
block in the slrgex_vdp
model several times. This task requires a
Model Loop component.
In the Outline pane on the left, select the then component.
In the Library pane in the middle, scroll down to the Simulink category, and then double-click Model Loop. It is added as a child of the
then
component.The Properties pane on the right looks as follows.
In the Properties pane on the right:
Select the Active check box to process the
slrgex_vdp
model.In the Traverse model selection list, select
Selected system(s) only
to traverse only theslrgex_vdp
model.Select
Model root
from the Starting system(s) selection list.At the bottom of the Properties pane on the left, select the Create section for each object in loop check box to create a chapter or section for each model. When you select this check box, the component name in the Outline pane on the left changes to Model Loop Chapter.
Select the Display the object type in the section title check box to include the object type (in this example, model) in the title name.
Clear the Create link anchor for each object in loop check box.
Save the report setup file.
Add a Paragraph for Each Model
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.In each Model Loop Chapter, add an explanation using the Paragraph component.
In the Outline pane on the left, select the Model Loop Chapter component.
In the Library pane in the middle, scroll up to the Formatting category, and then double-click Paragraph. The Paragraph component is added as a child of the Model Loop Chapter component.
In the Properties pane on the right, in the Paragraph Text text box, enter the following text:
When this report is generated, the variable names, preceded by percent signs (This report demonstrates Simulink Report Generator's ability to experiment with Simulink systems and auto-document the results. In this report, you load the model
%<expModel>
and simulate it%<length>
times. This report modifies the%<expBlock>
block's "%<expParam>
" value, setting it to the values%<expValue>
. Each iteration of the test includes a set of scope snapsnots in the report.%
) and enclosed in angle brackets (<>
), are replaced with the values of those variables in the MATLAB workspace.Save the report setup file.
Insert a Snapshot of the Model
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Inside each Model Loop Chapter component, include a snapshot of the current model using the System Snapshot component.
In the Outline pane on the left, select the Model Loop Chapter component.
In the Library pane in the middle, scroll down to the Simulink category, and then double-click the System Snapshot component.
This component inserts an image of the current model into your report. The Properties pane on the right looks as follows.
In the Properties pane on the right:
Select
Zoom
from the Scaling selection list.Enter
70
as the % value.
In the Outline pane on the left, select the System Snapshot component.
Click the down arrow on the toolbar once to move it under the Paragraph component.
Save the report setup file.
Add a Loop for Processing the Model
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Create a loop to process the model %length
times using the
For Loop component.
In the Outline pane on the left, select the System Snapshot component.
In the Library pane in the middle, under the Logical and Flow Control category, double-click For Loop. The For Loop component is added as a sibling of the System Snapshot component.
In the Properties pane on the right:
In the End text box, replace the existing text with the following text:
length(expValue)
expValue
is the array of Gain parameter values assigned in the Eval component with the commandexpValue=[-1 0 0.5 1 2];
. The expressionlength(expValue)
evaluates to5
in this example.In the Variable name text box, replace the existing text with the name of the
for loop
variable. Enter the following text:The name of the For component in the Outline pane on the left changes to reflect the loop variable and the termination value.expIteration
Save the report setup file.
Block Parameter Value from a MATLAB Expression
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.For each iteration, get a value from the expValue
array to use as
the Gain parameter value. This task requires an Evaluate
MATLAB Expression component.
In the Outline pane on the left, select the for component.
In the Library pane in the middle, under the MATLAB category, double-click Evaluate MATLAB Expression. In the Outline pane, the component name is shortened to Eval.
On the Properties pane on the right:
Clear the Insert MATLAB expression in report and Display command window output in report check boxes.
Enter the following text in the Expression to evaluate in the base workspace text box:
The%Evaluate this string in the base workspace if iscell(expValue) Iteration_Value=expValue{expIteration}; else Iteration_Value=... num2str(expValue(expIteration)); end
Iteration_Value
variable represents the designated array element.Clear the Evaluate this expression if there is an error check box.
Save the report setup file.
Create a Section for Each Iteration
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Create a separate section for each iteration of the loop that includes the data using
the Chapter/Subsection
component.
In the Outline pane on the left, under the for component, select the Eval component.
In the Library pane in the middle, under the Formatting category, double-click Chapter/Subsection to add it as a sibling. This component is automatically added as Section 1 because it is inside a Chapter component (the Model Loop Chapter component).
In the Properties pane on the right:
In the Title selection list, select
Custom
.In the text box, enter the following title:
Processing the slrgex_vdp model
This indicates that the section title comes from the first child component. Do not change any other properties.
Save the report setup file.
Insert the Block Value
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Insert the Gain
value that is used for each simulation.
In the Outline pane on the left, select the Section 1 component.
In the Library pane in the middle, under the MATLAB category, double-click Insert Variable.
In the Properties pane on the right:
In the Variable name text box, enter
Iteration_Value
.In the Display as selection list, select
Paragraph
.
The Properties pane on the right looks as follows.
Save the report setup file.
Set a Parameter Value
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.For each iteration, set the Gain
parameter to the value that you
extracted from the expValue
array.
In the Outline pane on the left, select the Variable component.
In the Library pane in the middle, under the MATLAB category, double-click Evaluate MATLAB Expression. This component is added as a sibling of the Variable component.
In the Properties pane on the right, clear the Insert MATLAB expression in report and Display command window output in report check boxes.
In the Expression to evaluate in the base workspace text box, replace the existing text with the following text.
Theset_param(expBlock,expParam,Iteration_Value); okSetValue=(1);
set_param
command sets the value of the Gain parameter for the Mu block in theslrgex_vdp
model to the value ofIteration_Value
.Make sure you select Evaluate this expression if there is an error. Enter the following text into the text box:
If theokSetValue=logical(0);
set_param
command works,okSetValue
is set to1
. If an error occurs,okSetValue
is set to0
. The next component then reports the error and terminates processing.Save the report setup file.
The Outline pane on the left looks as follows.
Check Value Using a Logical If Component
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Check the value of okSetValue
using a Logical
If component. If the value is 0
, the simulation cannot
proceed because the Gain parameter could not be set.
In the Outline pane on the left, select the Eval component for the
set_param
command.In the Library pane in the middle, under the Logical and Flow Control category, double-click Logical If. The component is added as a sibling of Eval.
In the Properties pane on the right, in the Test expression text box, replace
true
withokSetValue
.
okSetValue
can be 1
(true
) or 0
(false
), so
insert two components — Logical Then and Logical
Else — to process those conditions:
In the Outline pane on the left, select the if (okSetValue) component.
To insert Logical Then and Logical Else in the correct order:
In the Library pane in the middle, double-click the Logical Else component.
Select the if (okSetValue) component again.
Double-click the Logical Then component. The Outline pane on the left looks as follows.
In the Outline pane on the right, select the else component.
In the Library pane in the middle, double-click Paragraph.
If
okSetValue
=0
, the Gain parameter value is not set and the report displays an error.In the Properties pane on the right:
Choose
Custom title
from the Title Options selection list.Enter
Error
in the text box next to the selection list.Enter the following text into the Paragraph Text text box:
Could not set %<expBlock> "%<expParam>" to value %<Iteration_Value>.
Save the report.
Simulate the Model Using a Model Simulation Component
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Now that the model is open and the Gain parameter is set, use
the Model Simulation component to simulate the
slrgex_vdp
model.
In the Outline pane on the left, select the then component under the if (okSetValue) component.
In the Library pane, under the Simulink category, double-click Model Simulation. In the Outline pane on the left, this component is renamed Simulate model.
In the Properties pane on the right:
Clear the Use model's workspace I/O variable names check box.
In the Time text box, enter
dynamicT
.In the States text box, enter
dynamicX
.In the Output text box, enter
dynamicY
.
The Properties pane on the right looks as follows.
In the Outline pane on the left, select the Simulate model component.
In the Library pane in the middle:
Scroll down to the Simulink Blocks category.
Double-click Scope Snapshot to add it as a sibling of the Simulink Model component.
This component captures the scope for each iteration.
In the Properties pane on the right:
In the Paper orientation selection list, select
Portrait
.For the Image size, enter
[5 4]
.In the Scaling selection list, select
Zoom
.Enter
75
for the % value.
Save the report setup file.
To test to see if the signal data falls within a specified range, add another Logical If component:
In the Outline pane on the left, select the Scope Snapshot component.
In the Library pane in the middle, scroll up to the Logical and Flow Control category.
Double-click the Logical If component.
To test the signal data, replace
true
in the Test expression text box with the following in the Properties pane on the right:max(dynamicX(:,2))>testMin & max(dynamicX(:,2))<testMax
Save the report.
The Outline pane looks as follows:
If this condition is true, the signal data falls within the desired range. Add a Paragraph component to print information about the signal data in the report.
In the Outline pane on the left, select the if component you just added.
In the Library pane in the middle, under the Formatting category, double-click Paragraph so that it becomes a child of the if component.
In the Properties pane on the right:
From the Title Options selection list, select
Custom title
.Type
Success
in the text box.Enter the following text in the Paragraph text text box.
The conditioned signal has a maximum value of %<max(dynamicX(:,2))>, which lies in the desired range of greater than %<testMin> and less than %<testMax>.
To save the success values to insert into a table at the end of the iterations, use an Evaluate MATLAB Expression component.
In the Outline pane on the left, select the Paragraph component.
In the Library pane in the middle, under the MATLAB category, double-click Evaluate MATLAB Expression.
An unintended result occurs: the new component is a child of the Paragraph component.
To make the new component a sibling of the Paragraph component, in the Outline pane on the left, select the Eval component, and then Click the left arrow on the toolbar. The Eval component becomes a sibling of the Paragraph component.
In the Properties pane on the right, for the Eval component:
Clear the Insert MATLAB expression in report and Display command window output in report check boxes.
In the Expression to evaluate in the base workspace text box, enter the following to save the desired signal values in the
expOkValues
array:expOkValues=[expOkValues;... {Iteration_Value,max(dynamicX(:,2))}];
Make sure you select Evaluate this expression if there is an error. Insert the following text in the text box:
disp(['Error during eval: ', evalException.message])
Save the report setup file.
Create a Post-Test Analysis Section
Note
This section builds on the previous tasks. To see the completed report setup file,
open the simulink-dynamic.rpt
setup file.
setedit simulink-dynamic.rpt
slrgex_vdp
model.Now that you have collected all the desired values, create the post-test analysis section by creating a table and inserting it into your report at the end of this chapter.
In the Outline pane on the left, select the Model Loop Chapter component.
In the Library pane in the middle, under the Formatting category, double-click Chapter/Subsection.
The new section appears at the beginning of the chapter.
Click the down arrow three times so Section 1 moves to the end of the Model Loop Chapter component.
In the Properties pane on the right:
Select
Custom
in the Title selection list.Enter
Post-Test Analysis
in the text box.
In the Outline pane on the left, select the new Section 1 component.
In the Library pane in the middle, under the Formatting category, double-click Paragraph. Do not change its properties.
To check whether there are any signal values within the desired range, check the array
expOkValues
with a Logical If component. IfexpOkValues
is empty, there are no signal values in the desired range. Report the result of this check.In the Outline pane on the left, select the
Paragraph
component and add a Logical If child component.In the Properties pane on the right, enter the expression to evaluate in the Test expression text box:
This expression evaluates to~isempty(expOkValues)
0
(false
) ifexpOkValues
is empty; otherwise, it evaluates to1
(true
).In the Outline pane on the left, select the if (~isempty(expOkValue)) component and add the Logical Else component as a child.
Select the if(~isempty(expOkValue)) component again and add the Logical Then component as a child.
The two components are siblings in the Outline pane on the left.
Save the report setup file.
Now, insert report components to handle the case where
expOkValues
is empty; that is, where no signal values fall within the designated range.In the Outline pane on the left, select the else component.
In the Library pane in the middle, double-click the Text component to add it as a child of the else component.
In the Properties pane on the right, in the Text to include in report text box, enter the following:
None of the selected iteration values had a maximum signal value between %<testMin> and %<testMax>.
Now handle the case where
expOkValues
is not empty and you want to insert a table of the acceptable signal values.In the Outline pane on the left, select the then component.
Add a Text component as a child to the then component.
In the Properties pane on the right, in the Text to include in report text box, enter the following text.
%<size(expOkValues, 1)> values for %<expBlock> were found that resulted in a maximum signal value greater than %<testMin> but less than %<testMax>. The following table shows those values and their resulting signal maximum.
In the Outline pane on the left, select the Text component under the then component of the if (~isempty(expOkValues)) component.
To create an array for use when formatting the table, use the Evaluate MATLAB Expression component.
In the Library pane in the middle, double-click Evaluate MATLAB Expression.
In the Properties pane on the right:
Clear the Insert MATLAB expression in report and Display command window output in report check boxes.
The next component of the report uses the strings
Mu Value
andSignal Maximum
as table header values. Add the strings to the front of theexpOkValues
cell array by entering the following text into the Expression to evaluate in the base workspace text box:expOkValues=[{'Mu Value','Signal Maximum'} expOkValues];
Make sure you select the Evaluate this expression if there is an error check box. Enter the following text into the text box:
disp(['Error during eval: ', evalExpression.message])
In the Outline pane on the left, select the Eval component.
In the Library pane in the middle, under the Formatting category, double-click the Array-Based Table component so it becomes a sibling of the Text and Eval components.
In the Properties pane on the right:
In the Workspace variable name text box, enter
expOkValues
. The Simulink Report Generator software uses the contents ofexpOkValues
to construct the table.In the Table title text box, enter
Valid Iteration Values
.
Save the report setup file.
The Outline pane on the left looks as follows.
Generate the Report
To generate the report, click the Report icon on the toolbar. The following occurs:
A Message List window appears, displaying informational and error messages as the report is processed. Specify the level of detail you would like the Message List window to display while the report is being generated. Options range from
0
(least detail) to6
(most detail). Click the selection list located under the title bar of the Message List window to choose an option.Message level 3 (Important messages)
is used for the remainder of this example.The
slrgex_vdp
model appears. You can see each time it is simulated.The scope window appears. The scope graph changes each time the parameter value changes.
Each component of the report is highlighted as it executes, in the Outline pane on the left in the Report Explorer window.
When the report generation is complete, the report opens.