quantizenumeric
Quantize numeric data
Description
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.
Examples
Input Arguments
Output Arguments
Tips
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
, andsubsasgn
to separate the core algorithm from data type definitions.