uencode
Quantize and encode floating-point inputs to integer outputs
Description
specifies the option y
= uencode(x
,n
,v
,outputSign
)outputSign
to generate signed or unsigned integer
outputs.
Examples
Input Arguments
Output Arguments
Algorithms
The uencode
function maps the floating-point input value to an
integer value determined by the requirement for
2n levels of quantization. This encoding
adheres to the definition for uniform encoding specified in ITU-T Recommendation G.701. The
input range [-v,v]
is divided into 2n evenly
spaced intervals. Input entries in the range [-v,v]
are first quantized
according to this subdivision of the input range, and then mapped to one of
2n integers. The range of the output depends on whether you
specify that you want signed integers.
The function optimizes the output data types for the number of bits as shown in this table.
References
[1] International Telecommunication Union. General Aspects of Digital Transmission Systems: Vocabulary of Digital Transmission and Multiplexing, and Pulse Code Modulation (PCM) Terms. ITU-T Recommendation G.701. March, 1993.