This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


System object: dsp.VectorQuantizerEncoder
Package: dsp

Perform vector quantization encoding


INDEX = step(vqenc,INPUT)
INDEX = step(vqenc,...,CODEBOOK)
INDEX = step(vqenc,...,WEIGHTS)
[..., CODEWORD] = step(vqenc, ...)
[..., QERR] = step(vqenc, ...)



Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

INDEX = step(vqenc,INPUT) returns INDEX, a scalar or column vector representing the quantization region(s) to which INPUT belongs. INPUT can be a column vector of size k-by-1 or an M multichannel matrix of dimensions k-by-M, where k is the length of each codeword in the codebook. All inputs to the object can be real floating-point or fixed-point values and must be of the same data type. The output index values can be signed or unsigned integers.

INDEX = step(vqenc,...,CODEBOOK) uses the codebook given in input CODEBOOK, a k-by-N matrix with N codewords each of length k. This option is available when the CodebookSource property is Input port.

INDEX = step(vqenc,...,WEIGHTS) uses the input vector WEIGHTS to emphasize or de-emphasize certain input values when calculating the distortion measure. WEIGHTS must be a vector of length equal to the number of rows of INPUT. This option is available when the DistortionMeasure property is Weighted squared error and the WeightsSource property is Input port.

[..., CODEWORD] = step(vqenc, ...) outputs the CODEWORD values that correspond to each index value when the CodewordOutputPort property is true.

[..., QERR] = step(vqenc, ...) outputs the quantization error QERR for each input value when the QuantizationErrorOutputPort property is true.


obj specifies the System object on which to run this step method.

The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties (MATLAB) and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Was this topic helpful?