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.

ssSetInputPortWidth

Specify the width of an input port

Syntax

int_T ssSetInputPortWidth(SimStruct *S, int_T port, int_T width)

Arguments

S

SimStruct representing an S-Function block.

port

Index of the input port whose width is being set.

width

Width of the input port.

Description

Use in mdlInitializeSizes (after ssSetNumInputPorts) to specify a nonzero positive integer width or DYNAMICALLY_SIZED for each input port index starting at 0. If the width is dynamically sized, the S-function must provide mdlSetInputPortDimensionInfo and mdlSetDefaultPortDimensionInfo methods to enable the signal dimensions to be set correctly during signal propagation.

    Note   This macro and ssSetInputPortVectorDimension are functionally identical with the exception of their returns. ThessSetInputPortVectorDimension returns 1 if successful, and 0 otherwise.

Languages

C, C++

Example

See the S-function sfun_dtype_io.c used in sfcndemo_dtype_io.

Introduced before R2006a

Was this topic helpful?