rsimgetrtp - Model's global parameter structure

Syntax

rsimgetrtp(model, option)

option is optional.

Arguments

model

The model for which you are running the rapid simulations.

option (optional)

The parameter-value pair 'AddTunableParamInfo' 'value', where value can be 'on' or 'off'. If you set the parameter to 'on', the Real-Time Workshop® software extracts tunable parameter information from the specified model and returns it to param_struct.

Returns

A structure that contains the specified model's parameter structure.

Description

The rsimgetrtp function forces an update diagram action for the specified model and returns a structure that contains the following fields:

FieldDescription
modelChecksumA four-element vector that encodes the structure of the model. The Real-Time Workshop software uses the checksum to check whether the structure of the model has changed since the RSim executable was generated. If you delete or add a block, and then generate a new model_P vector, the new checksum no longer matches the original checksum. The RSim executable detects this incompatibility in parameter vectors and exits to avoid returning incorrect simulation results. If the model structure changes, you must regenerate the code for the model.
parametersA structure that contains the model's global parameters.

The parameters substructure includes the following fields:

FieldDescription
dataTypeNameThe name of the parameter's data type, for example, double
dataTypeIDAn internal data type identifier
complexThe value 0 if real and 1 if complex
dtTransIdxInternal use only
valuesA vector of parameter values

If you specify 'AddTunableParamInfo', 'on', the Real-Time Workshop software creates and then deletes model.rtw from your current working directory and includes a map substructure that has the following fields:

FieldDescription
IdentifierParameter name
ValueIndiciesA vector of indices to the parameter values
DimensionsA vector indicating the parameter dimensions

To use the AddTunableParamInfo option, you must enable inline parameters.

Examples

Returns the 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]

See Also

Creating a MAT-File That Includes a Model's Parameter Structure

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS