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.


Return word length of storage container of registered data type


extern int ssGetDataTypeFxpContainWordLen (SimStruct *S,
                                        DTypeId dataTypeId)



SimStruct representing an S-function block.


Data type ID of the registered data type for which you want to know the container word length.


This function returns the word length, in bits, of the storage container of the fixed-point data type designated by dataTypeId. This function does not return the size of the storage container or the word length of the data type. To get the storage container size, use ssGetDataTypeStorageContainerSize. To get the data type word length, use ssGetDataTypeFxpWordLength.


To use this function, you must include fixedpoint.h and fixedpoint.c. For more information, see Structure of the S-Function.




An sfix24_En10 data type has a word length of 24, but is actually stored in 32 bits during simulation. For this signal,

  • ssGetDataTypeFxpContainWordLen returns 32, which is the storage container word length in bits.

  • ssGetDataTypeFxpWordLength returns 24, which is the data type word length in bits.

  • ssGetDataTypeStorageContainerSize or sizeof( ) returns 4, which is the storage container size in bytes.

TLC Functions


Introduced before R2006a

Was this topic helpful?