Skip to Main Content Skip to Search
Product Documentation

ssGetOutputPortNumDimensions - Get the number of dimensions of an output port

Syntax

int_T ssGetOutputPortNumDimensions(SimStruct *S, int_T port)

Arguments

S

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

Example

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);

See Also

ssGetOutputPortDimensionSize

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS