Quantizer

Parent Previous Next

Full Library / Math Operator / Math and Trig / Quantizer
Block Name: Quantizer

Code File Location: VisualSim/actor/lib/Quantizer

Block Overview

The levels parameter contains an array of doubles specifying the quantization levels. The elements must be in an increasing order, or an exception will be thrown. The default value of levels is {-1.0, 1.0}.

Suppose u is the input, and levels = {a, b, c}, where a < b < c, then the output of the actor will be:

y = a, for u <= (b+a)/2;
y = b, for (b+a)/2 < u <= (c+b)/2;
y = c, for u > (c+b)/2;

Thus, for the default levels, the output is (almost) the signum function of the input, or +1.0 if the input is positive, and -1.0 otherwise. This is almost the signum function because it outputs -1.0 if the input is zero.

This actor does not require that the quantization intervals be equal, i.e. we allow that (c-b) != (b-a).

Field Detail

levels

public Parameter levels



Created with the Personal Edition of HelpNDoc: Generate EPub eBooks with ease