Simulink Control Design™ - MathWorks

(Tuis.) #1

getInputIndex


Get index of an input element of an operating point specification or operating point


The Inputs property of an operating point specification is an array that contains
trimming specifications for each model input. When defining a mapping function for
customized trimming of Simulink models, getInputIndex lets you obtain the index of an
input specification based on the corresponding block path.


When trimming Simulink models using optimization-based search, some applications
require additional flexibility in defining the optimization search parameters. For such
systems, you can specify custom constraints and a custom objective function. For complex
models, you can define a mapping that selects a subset of the model states, inputs, and
outputs to pass to the custom constraint and objective functions. For more information,
see “Compute Operating Points Using Custom Constraints and Objective Functions” on
page 1-78.


Syntax


index = getInputIndex(op,block)
index = getInputIndex(op,block,element)


Description


index = getInputIndex(op,block) returns the index of the input specification that
corresponds to block in the Inputs property of operating point specification op.


index = getInputIndex(op,block,element) returns the index of the specified
element within an input specification for an input port that has a port width greater than






Examples


getInputIndex
Free download pdf