Filter with Loop Context Functions
Use loop context functions to filter the modeling elements to report on and to perform special reporting on specific elements.
In the following example, in a Block Loop component, you use
RptgenSL.getReportedBlock in a Logical If component to report on
targeted blocks within a Block Loop component.
For a summary of loop context functions, see Loop Through Context Functions.
Create and Save Setup Files
Open the f14 model.
At the MATLAB® command prompt, enter:
In the Report Explorer, select File > New.
In the Properties pane, set Directory to
Present working directory.
Save the setup file as
Add these components to the report, in order.
|From this Library Folder||Add this Component||Set this Property|
Logical and Flow Control
Test Expression to
strcmp(get_param... (RptgenSL.getReportedBlock,'BlockType'),... 'Inport')
Simulink Property Table
The report setup file looks like this:
From the context menu, select Report.
The report includes a chapter with properties for the Inport blocks only.
If you wish, create a second chapter that reports on Outport blocks only, as shown below.