Global model parameter structure
parameter_structure = rsimgetrtp('
model
')
parameter_structure = rsimgetrtp('
forces
a block update diagram action for model
')model
,
a model for which you are running rapid simulations, and returns the
global parameter structure for that model. The function includes tunable
parameter information in the parameter structure.
The model parameter structure contains the following fields:
Field | Description |
---|---|
modelChecksum | A four-element vector that encodes the structure. The code
generator uses the checksum to check whether
the structure has changed since the RSim executable was generated.
If you delete or add a block, and then generate a new version of the
structure, the new checksum will not match
the original checksum . The RSim executable
detects this incompatibility in model parameter structures and exits
to avoid returning incorrect simulation results. If the structure
changes, you must regenerate code for the model. |
parameters | A structure that defines model global parameters. |
The parameters
substructure includes the
following fields:
Field | Description |
---|---|
dataTypeName | Name of the parameter data type, for example, double |
dataTypeID | An internal data type identifier |
complex | Value 1 if parameter values are complex and 0 if real |
dtTransIdx | Internal use only |
values | Vector of parameter values |
structParamInfo | Information about structure and bus parameters in the model |
The structParamInfo
substructure contains these fields:
Field | Description |
---|---|
Identifier | Name of the parameter |
ModelParam | Value 1 if parameter is a model parameter and 0 if it is a block parameter |
BlockPath | Block path for a block parameter. This field is empty for model parameters. |
CAPIIdx | Internal use only |
Do not modify fields in structParamInfo
.
The function also includes an array of substructures map
that
represents tunable parameter information with these fields:
Field | Description |
---|---|
Identifier | Parameter name |
ValueIndicies | Vector of indices to parameter values |
Dimensions | Vector indicating parameter dimensions |
Return global parameter structure for model rtwdemo_rsimtf
to param_struct
:
rtwdemo_rsimtf param_struct = rsimgetrtp('rtwdemo_rsimtf') param_struct = modelChecksum: [1.7165e+009 3.0726e+009 2.6061e+009 2.3064e+009] parameters: [1x1 struct]