Construction ue = dsp.UniformEncoder returns a uniform encoder, ue, that quantizes floating-point input samples and encodes them as integers using 2 N-level quantization, where N is an integer. Ue = dsp.UniformEncoder(' PropertyName', PropertyValue.) returns an uniform encoder, ue, with each specified property set to the specified value. Ue = dsp.UniformEncoder(peakvalue,numbits, ' PropertyName', PropertyValue.) returns a uniform encoder, ue, with the PeakValue property set to peakvalue, the NumBits property set to numbits, and other specified properties set to the specified values. Properties PeakValue Largest input amplitude to be encoded Specify the largest input amplitude to be encoded, as a nonnegative numeric scalar.
The other definition is a band-limited signal of finite energy. To perform non uniform quantization one needs to pass the signal into the compressor and then into the uniform quantizer. Non uniform quantization takes care of both high and small variations in the amplitude levels of the signal. We have two laws to perform the quantization.
If the real or imaginary input are outside of the interval – P,(1 – 2 (1 – B)) P, where P is the peak value and B is the value of the NumBits property, the uniform encoder saturates (independently for complex inputs) at those limits. The default is 1. NumBits Number of bits needed to represent output Specify the number of bits needed to represent the integer output as an integer value between 2 and 32.
The number of levels at which the uniform encoder quantizes the floating-point input is 2 B, where B is the number of bits. The default is 8. OutputDataType Data type of output Specify the data type of the output as Unsigned integer or Signed integer. Unsigned outputs are uint8, uint16, or uint32, and signed outputs are int8, int16, or int32. The quantized inputs are linearly (uniformly) mapped to the intermediate integers in the interval 0,2 ( B – 1) when you set this property to Unsigned integer, and in the interval –2 ( B – 1),2 ( B – 1) – 1 when you set this property to Signed integer. The variable B in both expressions corresponds to the value of the NumBits property.