DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > BITQUANT
Quantizes an input series to 2bits levels.
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 |
xh |
- |
Optional. A real, the high value input range. Defaults to |
A series or real
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
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.
BITQUANT always outputs integer values. See QUANTIZE to quantize a series to an arbitrary number of levels.