Documentation

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.

ssSetZeroBasedIndexInputPort

Specify that an input port expects zero-based indices

Syntax

void ssSetZeroBasedIndexInputPort(SimStruct *S, int_T pIdx)

Arguments

S

SimStruct representing an S-Function block.

pIdx

Input port of the S-function.

Description

Use this macro in mdlInitializeSizes to specify that port pIdx expects 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 input port expecting zero-based indices is connected to a block that is producing one-based indices. The engine signals an error if it detects that the signal connected to this block is one-based. Simulink blocks that can produce indices include the For Iterator and S-function blocks. If neither this macro nor ssSetOneBasedIndexInputPort is invoked, The engine does not run this diagnostic, even if the input port is connected to a block that produces indices.

Languages

C, C++

Introduced before R2006a

Was this topic helpful?