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.

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 by S. Must be a nonnegative integer.

Returns

The Boolean value true if successful. Otherwise, returns false.

Description

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

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

where ssSetNumInputPorts returns false if nInputPorts is negative or an error occurs while creating the ports.

Languages

C, C++

Example

See the S-function sfun_multirate.c used in sfcndemo_sfun_multirate.

Introduced before R2006a

Was this topic helpful?