The VectorQuantizerEncoder
object performs
vector quantization encoding. The object finds the nearest codeword
by computing a distortion based on Euclidean or weighted Euclidean
distance.
To perform vector quantization encoding:
Define and set up your vector quantizer encoder. See Construction.
Call step
to perform the quantization
encoding according to the properties of dsp.VectorQuantizerEncoder
.
The behavior of step
is specific to each object in
the toolbox.
Note:
Starting in R2016b, instead of using the 
vqenc = dsp.VectorQuantizerEncoder
returns
a vector quantizer encoder System object, vqenc
.
This object finds a zerobased index of the nearest codeword for each
given input column vector.
vqenc = dsp.VectorQuantizerEncoder(
returns
a vector quantizer encoder System object, 'PropertyName'
,PropertyValue
,...)vqenc
,
with each specified property set to the specified value.

Source of codebook values Specify how to determine the codebook values as 

Codebook Specify the codebook to which the input column vector or matrix
is compared, as a kbyN matrix.
Each column of the codebook matrix is a codeword, and each codeword
corresponds to an index value. The codeword vectors must have the
same number of rows as the input. The first codeword vector corresponds
to an index value of $$\left[\begin{array}{l}\text{1}\text{.513}\text{.3136}\text{.46}\text{.8}\\ \text{2}\text{.514}\text{.3137}\text{.47}\text{.8}\\ \text{3}\text{.515}\text{.3138}\text{.48}\text{.8}\end{array}\right]$$ This property is tunable. 

Distortion calculation method Specify how to calculate the distortion as 

Source of weighting factor Specify how to determine weighting factor as 

Weighting factor Specify the weighting factor as a vector of length equal to
the number of rows of the input. This property applies when you set
the 

Behavior when input column vector is equidistant from two codewords. Specify whether to represent the input column vector by the
lower index valued codeword or higher indexed valued codeword when
an input column vector is equidistant from two codewords. You can
set this property to 

Enable output of codeword value Set this property to 

Enable output of quantization error Set this property to 

Data type of index output Specify the data type of the index output as: 
step  Perform vector quantization encoding 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
This object implements the algorithm, inputs, and outputs described on the Vector Quantizer Encoder block reference page. The object properties correspond to the block parameters.