Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

rsimsetrtpparam - Set parameters of rtP model parameter structure

Syntax

rtp = rsimsetrtpparam(rtp, idx)
rtp = rsimsetrtpparam(rtp, 'paramName', paramValue)
rtP = rsimsetrtpparam( rtP, idx, 'paramName', paramValue )

Description

rtp = rsimsetrtpparam(rtp, idx)

Expands the rtP structure to have idx sets of parameters

rtp = rsimsetrtpparam(rtp, 'paramName', paramValue)

Takes an rtP structure with tunable parameter information and sets the values associated with 'paramName' to be paramValue if possible. There can be more than one name-value pair.

rtP = rsimsetrtpparam( rtP, idx, 'paramName', paramValue )

The rsimsetrtpparam utility allows for defining the values of an existing rtP parameter structure.

Takes an rtP structure with tunable parameter information and sets the values associated with 'paramName' to be paramValue in the idx'th parameter set. There can be more than one name-value pair. If the rtP structure does not have idx parameter sets, the first set is copied and appended until there are idx parameter sets. Subsequently, the idx'th set is changed.

Inputs

rtP

A parameter structure that contains the sets of parameter names and their respective values.

idx

An index used to indicate the number of parameter sets in the rtP structure

paramValue

The value of the rtP parameter, paramName

paramName

The name of the parameter set to add to the rtP structure

Outputs

rtP

An expandedrtP parameter structure that contains idx additional parameter sets defined by the rsimsetrtpparam function call.

Definitions

The rtP structure should match the format of the structure returned by rsimsetrtp(modelName).

Examples

  1. Expand the number of parameter sets in the 'rtp' structure to 10.

    rtp = rsimsetrtpparam(rtp, 10);
  2. Add three parameter sets to the parameter structure, 'rtp'.

    rtp = rsimsetrtpparam(rtp, idx, 'X1', iX1, 'X2' ,iX2, 'Num', iNum);

See Also

rsimgetrtp

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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