Contenido principal

ssFxpConvertToRealWorldValue

Convert value of any data type to double

Syntax

extern double ssFxpConvertToRealWorldValue (SimStruct *S,
                                            const void *pVoidSrc,
                                            size_t sizeofSrc,
                                            DTypeId dataTypeIdSrc)

Arguments

S

SimStruct representing an S-function block.

pVoidSrc

Pointer to the value you want to convert.

sizeofSrc

Size in memory of the value you want to convert.

dataTypeIdSrc

Data type ID of the value you want to convert.

Description

This function converts a value of any registered built-in or fixed-point data type to a double.

Requirements

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

  • To build an S-function that utilizes this function, you must compile it using the mex function with -lfixedpoint argument. For more information, see Create MEX Files.

Languages

C

TLC Functions

None

Version History

Introduced before R2006a