Main Content

Quantize numeric data

quantizes the value specified in `y`

= quantizenumeric(`x`

,`s`

,`w`

,`f`

)`x`

using signedness
`s`

, word length `w`

, and fraction length
`f`

.

Use `quantizenumeric`

when you want to simulate full-precision
arithmetic with doubles and then add quantization at certain steps in your algorithm
without casting to fixed-point types.

Use

`quantizenumeric`

when you want to simulate full-precision arithmetic with doubles and then add quantization at certain steps in your algorithm without casting to fixed-point types.When designing fixed-point algorithms, use

`cast`

,`zeros`

,`ones`

,`eye`

, and`subsasgn`

to separate the core algorithm from data type definitions.