Main Content

ssGetOutputPortNumDimensions

Get the number of dimensions of an output port

Syntax

int_T ssGetOutputPortNumDimensions(SimStruct *S, int_T port)

Arguments

S

SimStruct that represents an S-function block.

port

Index of an output port.

Returns

A positive integer indicating the number of dimensions of the output port specified by the index port, or DYNAMICALLY_SIZED, if the number of dimensions is unknown.

Description

Use to determine the number of dimensions of output port specified by the index port.

Languages

C, C++

Examples

The following lines return the length of the last dimension of the first output port.

int_T numDim = ssGetOutputPortNumDimensions(S, 0);
int_T lDim - ssGetOutputPortDimensionSize(S, 0, numDim-1);

Version History

Introduced before R2006a