Communications Toolbox    

Representing Quantization Parameters

Scalar quantization is a process that maps all inputs within a specified range to a common value. It maps inputs in a different range of values to a different common value. In effect, scalar quantization digitizes an analog signal. Two parameters determine a quantization: a partition and a codebook. This section describes how toolbox functions represent these parameters.

Partitions

A quantization partition defines several contiguous, nonoverlapping ranges of values within the set of real numbers. To specify a partition in MATLAB, list the distinct endpoints of the different ranges in a vector.

For example, if the partition separates the real number line into the four sets:

  1. {xx  0}
  2. {x: 0< x  1}
  3. {x: 1 < x  3} and
  4. {x: 3 < x}

then you can represent the partition as the three-element vector

Notice that the length of the partition vector is one less than the number of partition intervals.

Codebooks

A codebook tells the quantizer which common value to assign to inputs that fall into each range of the partition. Represent a codebook as a vector whose length is the same as the number of partition intervals. For example, the vector

is one possible codebook for the partition [0,1,3].


 Source Coding Quantizing a Signal