MATLAB Report Generator    
Model Variables

Component

Model Variables

Category

Simulink

Description

The Model Variables component creates a table that shows all workspace variables used by reported blocks in a Simulink model. The current model and systems in which the blocks appear are specified in the Model Loop component.

For example, a Simulink Gain block might have a string x instead of a number. Simulink looks for a variable x in the workspace.

Attributes

This is the Model Variables attribute page.

Include Variables

This context-sensitive frame shows that this component is reporting on variables in reported blocks in the current model.

Include workspace I/O parameters
Select this option to report on variables that contain parameters with time vectors and state matrices. These parameters are set in the Workspace
I/O
tab in the Simulation Parameters dialog box in a Simulink model.
In the following table, if any of the entries in the first column are "on," the component will look for the variable listed in the second column in the workspace. If the component finds it, it includes the variable in the report.

LoadExternalInput
ExternalInput
SaveTime
TimeSaveName
SaveState
StateSaveName
SaveOutput
OutputSaveName
LoadInitialState
Initial State
SaveFinalState
FinalStateName

Table Columns

The options in this section specify the information included in the table. The first column is always Variable Name.

Block in which variable appears
Select this option to include the name of the block that contains the reported variable. The title of this column is Parent Blocks.
String from which variable was called
Select this option to include the piece of M-code that calls the reported variable. The title of this column is Calling String.
Size of variable (MxN)
Select this option to include the size of the reported variable. The title of this column is Size.
Memory requirements (bytes)
Select this option to include amount of memory bytes the reported variable needs. The title of this column is Bytes.
Class of variable (double, string, etc.)
Select this option to include the variable class to which the reported variable belongs. The title of this column is Class.
Value in Workspace
Select this option to include the actual value of the reported variable. The title of this column is Value. Note that very large arrays may display as [MxN CLASS]. For example, if you have a 300-by-200 double array, it will display in the report as [300x200 DOUBLE].
RTW Storage Class
Select this option to include the storage class of the reported variable. The title of this column is Storage Class.
This option looks at the model's TunableVars property to see if any of the model variables specify their storage class. If the storage class is specified, then the model variables table displays TunableVarsStorageClass and TunableVarsTypeQualifier in a table column. The column entries are TunableVarsStorageClass (TunableVarsTypeQualifier) if TunableVarsTypeQualifier is not empty. If TunableVarsTypeQualifier is empty, the column entry is TunableVarsStorageClass.
The values for TunableVarsStorageClass are:

Exported Global

Auto

ImportedExtern

ImportedExtern Pointer

Table Display

Table title:
Enter the title of the table in this field.
Display table border
Select this option if you want to have a border around the table.

Example

This is an example of a table created by the Model Variables component. This property table is reporting on the variables in the Controller in the F14 demo model.

Variable Name
Parent Blocks
Calling string
Value
Ka

f14/Controller/Gain3

Ka

0.677

Kf

f14/Controller/Gain

Kf

-1.746

Ki

f14/Controller/Proportional plus integral compensator

[Ki]

-3.864

Kq

f14/Controller/Gain2

Kq

0.8156

Insert anything into report?

Yes. Table.

Filename

csl_variables


  Model Simulation Object Linking Anchor