Main Content

rsimgetrtp

Global model parameter structure

Syntax

parameter_structure = rsimgetrtp('model')

Description

parameter_structure = rsimgetrtp('model') forces a block update diagram action for 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:

FieldDescription
modelChecksumA 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.
parametersA structure that defines model global parameters.

The parameters substructure includes the following fields:

FieldDescription
dataTypeNameName of the parameter data type, for example, double
dataTypeIDAn internal data type identifier
complexValue 1 if parameter values are complex and 0 if real
dtTransIdxInternal use only
valuesVector of parameter values
structParamInfoInformation about structure and bus parameters in the model

The structParamInfo substructure contains these fields:

FieldDescription
IdentifierName of the parameter
ModelParamValue 1 if parameter is a model parameter and 0 if it is a block parameter
BlockPathBlock path for a block parameter. This field is empty for model parameters.
CAPIIdxInternal 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:

FieldDescription
IdentifierParameter name
ValueIndiciesVector of indices to parameter values
DimensionsVector indicating parameter dimensions

Examples

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]
Introduced in R2006a