DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > BITQUANT

 

BITQUANT

Purpose:

Quantizes an input series to 2bits levels.

Syntax:

BITQUANT(xi, bits, xl, xh)

xi

-

An input series or scalar.

bits

-

Optional. An integer, the number of quantization bits. Defaults to 8 (i.e. 256 levels)

xl

-

Optional. A real, the low value input range. Defaults to min(s).

xh

-

Optional. A real, the high value input range. Defaults to max(s).

Returns:

A series or real

Examples:

bitquant(1..100, 3);stem

 

quantizes the series to 2^3 == 8 levels and returns a 100 point series with quantized values of: 0, 1, 2, 3, 4, 5, 6, 7

Example:

bitquant(1..100, 3, -100, 100);stem

 

The input full scale input range is to +-100. The resulting output now shows only 4 distinct levels since the actual input series only ranges from 1 to 100, about half the full scale input range.

Remarks:

BITQUANT always outputs integer values. See QUANTIZE to quantize a series to an arbitrary number of levels.

See Also:

BITSCALE

LINSCALE

RESCALE

QUANTIZE