| Real-Time Workshop® | ![]() |
rsimgetrtp(model, option)
option is optional.
The model for which you are running the rapid simulations.
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.
A structure that contains the specified model's parameter structure.
The rsimgetrtp function forces an update diagram action for the specified model and returns a structure that contains the following fields:
| Field | Description |
|---|---|
| modelChecksum | A 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. |
| parameters | A structure that contains the model's global parameters. |
The parameters substructure includes the following fields:
| Field | Description |
|---|---|
| dataTypeName | The name of the parameter's data type, for example, double |
| dataTypeID | An internal data type identifier |
| complex | The value 0 if real and 1 if complex |
| dtTransIdx | Internal use only |
| values | A 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:
| Field | Description |
|---|---|
| Identifier | Parameter name |
| ValueIndicies | A vector of indices to the parameter values |
| Dimensions | A vector indicating the parameter dimensions |
To use the AddTunableParamInfo option, you must enable inline parameters.
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]Creating a MAT-File That Includes a Model's Parameter Structure
![]() | rtwreport | updateFilePathsAndExtensions | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |