Skip to Main Content Skip to Search
Product Documentation

The numerictype Structure

Valid Values for numerictype Structure Properties

The numerictype object contains all the data type and scaling attributes of a fixed-point object. The numerictype object behaves like any MATLAB structure, except that it only lets you set valid values for defined fields. The following table shows the possible settings of each field of the structure.

DataTypeModeDataTypeScalingSignednessWord-
Length
Fraction-
Length
SlopeBias

Fixed-point data types

Fixed-point: binary point scaling

Fixed

BinaryPoint

Signed
Unsigned
Auto

Positive integer from 1 to 65,536

Positive or negative integer

2^(-fraction length)

0

Fixed-point: slope and bias scaling

Fixed

SlopeBias

Signed
Unsigned
Auto

Positive integer from 1 to 65,536

N/A

Any floating- point number

Any floating- point number

Fixed-point: unspecified scaling

Fixed

Unspecified

Signed
Unsigned
Auto

Positive integer from 1 to 65,536

N/A

N/A

N/A

Scaled double data types

Scaled double: binary point scaling

ScaledDouble

BinaryPoint

Signed
Unsigned
Auto

Positive integer from 1 to 65,536

Positive or negative integer

2^(-fraction length)

0

Scaled double: slope and bias scaling

ScaledDouble

SlopeBias

Signed
Unsigned
Auto

Positive integer from 1 to 65,536

N/A

Any floating- point number

Any floating- point number

Scaled double: unspecified scaling

ScaledDouble

Unspecified

Signed
Unsigned
Auto

Positive integer from 1 to 65,536

N/A

N/A

N/A

Built-in data types

Double

double

N/A

1
true

64

0

1

0

Single

single

N/A

1
true

32

0

1

0

Boolean

boolean

N/A

0
false

1

0

1

0

You cannot change the numerictype properties of a fi object after fi object creation.

Properties That Affect the Slope

The Slope field of the numerictype structure is related to the SlopeAdjustmentFactor and FixedExponent properties by

The FixedExponent and FractionLength properties are related by

If you set the SlopeAdjustmentFactor, FixedExponent, or FractionLength property, the Slope field is modified.

Stored Integer Value and Real World Value

The numerictype StoredIntegerValue and RealWorldValue properties are related according to

which is equivalent to

If any of these properties is updated, the others are modified accordingly.

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS