Documentation

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.

dsp.VectorQuantizerDecoder System object

Package: dsp

Vector quantizer codeword for given index value

Description

The VectorQuantizerDecoder object returns the vector quantizer codeword for a given index value. Each column of the Codebook property is a codeword.

To obtain the vector quantizer codeword for a given index value:

  1. Define and set up your vector quantizer decoder. See Construction.

  2. Call step to get the vector quantizer codeword according to the properties of dsp.VectorQuantizerDecoder. The behavior of step is specific to each object in the toolbox.

    Note:   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.

Construction

H = dsp.VectorQuantizerDecoder creates a vector quantizer decoder System object, H, that returns a vector quantizer codeword corresponding to a given, zero-based index value.

H = dsp.VectorQuantizerDecoder('PropertyName',PropertyValue,...) returns a vector quantizer decoder, H, with each specified property set to the specified value.

Properties

CodebookSource

Source of codebook values

Specify the codebook source as Property or Input port. When you select Property, the object reads the codebook from the codebook property. When you select Input port, the object reads the codebook from the input of the step method.

The default is Property.

Codebook

codebook

Specify quantized output values as a k-by-N matrix, where k1 and N1. Each column of the codebook matrix is a codeword, and each codeword corresponds to an index value. This property applies when you set the CodebookSource property to Property. The default is:

[1.5 13.3 136.4 6.82.5 14.3 137.4 7.83.5 15.3 138.4 8.8]

This property is tunable.

OutputDataType

Data type of codebook and quantized output

Specify the data type of the codebook and quantized output values as: Same as input, double, single or Custom. This property applies only when you set CodebookSource to Property. The default is double.

 Fixed-Point Properties

Methods

cloneCreate vector quantizer decoder object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs of step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
stepPerform vector quantization decoding

Examples

expand all

Note: This example runs only in R2016b or later. If you are using an earlier release, replace each call to the function with the equivalent step syntax. For example, myObject(x) becomes step(myObject,x).

Given index values as an input, determine the corresponding vector quantized codewords for a specified codebook.

hvqdec = dsp.VectorQuantizerDecoder;
hvqdec.Codebook = [1 10 100;2 20 200;3 30 300];
indices = uint8([1 0 2 0]);
qout = hvqdec(indices)
qout =

    10     1   100     1
    20     2   200     2
    30     3   300     3

Algorithms

This object implements the algorithm, inputs, and outputs described on the Vector Quantizer Decoder block reference page. The object properties correspond to the block parameters, except:

There is no object property that directly corresponds to the Action for out of range index value block parameter. The object sets any index values less than 0 to 0 and any index values greater than or equal to N to N-1.

Introduced in R2012a

Was this topic helpful?