quantize
Quantize fi
values using fixed.Quantizer
object
quantize
and fixed.Quantizer
are not recommended.
Use cast
, zeros
, ones
, eye
, or subsasgn
instead. For more information, see
Compatibility Considerations.
Syntax
Description
uses the y
= quantize(q
,x
)fixed.Quantizer
object q
to quantize
x
. x
can be any fixed-point
fi
number except a Boolean value.
If
x
is a scaled double, the data of the outputy
will be the same as the data of the inputx
. Only the fixed-point settings ofy
will change.When
x
is a double or single, theny
=x
. This functionality allows you to share the same code for both floating-point data types and fixed-pointfi
data types when quantizers are present.