Main Content

sfix

CreateSimulink.NumericTypeobject describing signed fixed-point data type

Syntax

a = sfix(WordLength)

Description

sfix(WordLength)返回一个Simulink.NumericTypeobject that describes a signed fixed-point number with the specified word length and unspecified scaling.

Note

sfixis a legacy function. In new code, usefixdtinstead. In existing code, replacesfix(WordLength)withfixdt(1,WordLength).

Examples

Define a 16-bit signed fixed-point data type.

a = sfix(16)
a = NumericType with properties: DataTypeMode: 'Fixed-point: unspecified scaling' Signedness: 'Signed' WordLength: 16 IsAlias: 0 DataScope: 'Auto' HeaderFile: '' Description: ''
Introduced before R2006a