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.

unitquantizer

Constructor for unitquantizer object

Syntax

q = unitquantizer(...)

Description

q = unitquantizer(...) constructs a unitquantizer object, which is the same as a quantizer object in all respects except that its quantize method quantizes numbers within eps(q) of +1 to exactly +1.

See quantizer for parameters.

Examples

In this example, a vector x is quantized by a unitquantizer object u .

u = unitquantizer([4 3]);
x = (0.8:.1:1.2)';
y = quantize(u,x);
z = [x y]
e = eps(u)

This quantization outputs an array containing the original values of x and the values of x that were quantized by the unitquantizer object u. The output also includes e, the value of eps(u).

z =

    0.8000    0.7500
    0.9000    1.0000
    1.0000    1.0000
    1.1000    1.0000
    1.2000    1.0000


e =

    0.1250

Introduced in R2008a

Was this topic helpful?