Representing 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

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

partition = [0,1,3];

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


© 1994-2005 The MathWorks, Inc.