Contents

ssSetOutputPortVectorDimension

Specify dimension information for an output port that emits vector signals

Syntax

int_T ssSetOutputPortVectorDimension(SimStruct *S,  int_T port,
   int_T w)

Arguments

S

SimStruct representing an S-Function block.

port

Index of an output port.

w

Width of the vector or DYNAMICALLY_SIZED.

Returns

1 if successful; otherwise, 0.

Description

Specifies that port emits a w-element vector signal. 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.

    Note   This function and the ssSetOutputPortWidth macro are functionally identical.

Languages

C, C++

Example

The following example specifies that output port 0 emits an 8-element matrix signal.

ssSetOutputPortVectorDimension(S, 0, 8);

See the S-function sdotproduct.csdotproduct.c used in sfcndemo_sdotproductsfcndemo_sdotproduct for a complete example that uses this function.

Was this topic helpful?