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.

ssSetDWorkDataType

Specify the data type of a data type work vector

Syntax

DTypeId ssSetDWorkDataType(SimStruct *S, int_T vector, DTypeId dtID)

Arguments

S

SimStruct representing an S-Function block.

vector

Index of a data type work vector, where the index is one of 0, 1, 2, ... ssGetNumDWork(S)-1.

dtID

ID of a data type.

Returns

The data type ID specified by dtID. Returns -1 if dtID is DYNAMICALLY_TYPED.

Description

Use in mdlInitializeSizes or mdlSetWorkWidths to set the data type of the specified work vector. For a list of built-in values for the data type ID dtId, see ssGetInputPortDataType. For more information on using DWork vectors, see How to Use DWork Vectors.

Languages

C, C++

Example

See the S-function sfun_rtwdwork.c used in sfcndemo_sfun_rtwdwork.

Introduced before R2006a

Was this topic helpful?