Function File: qidx = quantiz (x, table)
Function File: [qidx, q] = quantiz (x, table, codes)
Function File: [ qidx, q, d] = quantiz (…)

Quantization of an arbitrary signal relative to a partitioning.

qidx = quantiz (x, table)

Determine position of x in strictly monotonic table. The first interval, using index 0, corresponds to x <= table(1). Subsequent intervals are table(i-1) < x <= table(i).

[qidx, q] = quantiz (x, table, codes)

Associate each interval of the table with a code. Use codes(1) for x <= table(1) and codes(n+1) for table(n) < x <= table(n+1).

[qidx, q, d] = quantiz (...)

Compute distortion as mean squared distance of x from the corresponding quantization values.

Package: communications