Main Content

rsimgetrtp

Global model parameter structure

Description

example

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.

Examples

collapse all

Return global parameter structure for model rapidsim to param_struct.

param_struct = rsimgetrtp('rapidsim')

param_struct = 

    modelChecksum: [1.7165e+009 3.0726e+009 2.6061e+009 
2.3064e+009]
       parameters: [1x1 struct]

Input Arguments

collapse all

Output Arguments

collapse all

The model parameter structure contains these 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 does 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, regenerate code for the model.
parametersA structure that defines model global parameters.

The parameters substructure includes these 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 and empty for model parameters
CAPIIdxInternal use only.

Do not modify fields in structParamInfo.

The function also includes an array of substructures, map, which represents tunable parameter information with these fields:

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

Version History

Introduced in R2006a