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.

ssGetInputPortWidth

Get the width of an input port

Syntax

int_T ssGetInputPortWidth(SimStruct *S, int_T port)

Arguments

S

SimStruct representing 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++

Example

See the S-function sfun_zc_sat.c used in sfcndemo_sfun_zc_sat.

Introduced before R2006a

Was this topic helpful?