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
xis a scaled double, the data of the outputywill be the same as the data of the inputx. Only the fixed-point settings ofywill change.When
xis a double or single, theny=x. This functionality allows you to share the same code for both floating-point data types and fixed-pointfidata types when quantizers are present.