Skip to Main Content Skip to Search
Product Documentation

ssSetZeroBasedIndexOutputPort - Specify that an output port emits zero-based indices.

Syntax

void ssSetZeroBasedIndexOutputPort(SimStruct *S, int_T pIdx)

Arguments

S

SimStruct representing an S-Function block.

pIdx

Output port of the S-function.

Description

Use this macro in mdlInitializeSizes to specify that port pIdx emits zero-based index values. By setting this macro, the Simulink engine runs a diagnostic when it updates the diagram to check if the S-function output port emitting zero-based indices is connected to a block that expects one-based indices. The engine signals an error if it detects that the output port is connected to an input that expects one-based indices. Simulink blocks that accept indices include the Selector, Assignment, and S-function blocks. If neither this macro nor ssSetOneBasedIndexOutputPort is invoked, the engine does not run this diagnostic, even if the output port is connected to a block that accepts indices.

Languages

C, C++

See Also

mdlInitializeSizes, ssSetZeroBasedIndexInputPort, ssSetOneBasedIndexOutputPort

  


Related Products & Applications

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

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