ssGetInputPortWidth
Get the width of an input port
Syntax
int_T ssGetInputPortWidth(SimStruct *S, int_T port)
Arguments
S
SimStruct that represents an S-Function block.
port
Index of the port whose width is required.
Returns
An int_T
value indicating the number of elements in the input
signal. If the number of elements is unknown, returns
DYNAMICALLY_SIZED
.
Description
Gets the input port number of elements. If the input port is a 1-D array with
w
elements, this function returns w
. If
the input port is an M-by-N matrix, this function returns m*n
. If
m
or n
is unknown, this function returns
DYNAMICALLY_SIZED
. Use in any routine (except
mdlInitializeSizes
) to determine the width of an input
port.
Languages
C, C++
Examples
See the S-function sfun_zc_sat.c
used in sfcndemo_sfun_zc_sat
.
See Also
Version History
Introduced before R2006a