Skip to Main Content Skip to Search
Product Documentation

ssSetOutputPortWidth - Specify the width of an output port

Syntax

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

Arguments

S

SimStruct representing an S-Function block.

port

Index of the output port whose width is being set.

width

Width of an output port.

Description

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

Languages

C, C++

Example

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

See Also

ssSetNumOutputPorts, ssSetInputPortWidth, ssSetOutputPortVectorDimension

  


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