This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Specify that an output port emits zero-based indices.


void ssSetZeroBasedIndexOutputPort(SimStruct *S, int_T pIdx)



SimStruct representing an S-Function block.


Output port of the S-function.


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.


C, C++

Introduced before R2006a

Was this topic helpful?