Main Content

ssSetNumInputPorts

Specify the number of input ports that a block has

Syntax

boolean_T ssSetNumInputPorts(SimStruct *S, int_T nInputPorts)

Arguments

S

SimStruct representing an S-Function block.

nInputPorts

Number of input ports on the block represented byS. Must be a nonnegative integer.

Returns

The Boolean valuetrueif successful. Otherwise, returnsfalse.

Description

Use inmdlInitializeSizesto set the number of input ports to a nonnegative integer. Invoke it using

if (!ssSetNumInputPorts(S,nInputPorts)) return;

wheressSetNumInputPortsreturnsfalseifnInputPortsis negative or an error occurs while creating the ports.

Languages

C, C++

Example

See the S-functionsfun_multirate.cused insfcndemo_sfun_multirate.

Introduced before R2006a