ssSetOneBasedIndexInputPort
Specify that an input port expects one-based indices
Syntax
void ssSetOneBasedIndexInputPort(SimStruct *S, int_T pIdx)
Arguments
S
SimStruct that represents an S-Function block.
pIdx
Input port of the S-function.
Description
Use this macro in mdlInitializeSizes
to specify that
port pIdx
expects one-based index values. By setting this macro,
the Simulink® software runs a diagnostic when it updates the diagram to check if the
S-function input port expecting one-based indices is connected to a block that is
producing zero-based indices. The Simulink software signals an error if it detects that the signal connected to
this block is zero-based. Simulink blocks that can produce indices include the For Iterator and
S-function blocks. If neither this macro nor ssSetZeroBasedIndexInputPort
is
invoked, the Simulink software does not run this diagnostic, even if the input port is
connected to a block that produces indices.
Languages
C, C++
Version History
Introduced before R2006a