QUANT_f
Quantization
Block Screenshot
 
Contents
Description
This block outputs the quantization of the input according to a choice of methods (quantization types):
- 1: Round - Rounding the number of quantization steps (output signal is the nearest step) 
- 2: Truncation - Truncating the number of quantization steps (output signal is the nearest step towards 0) 
- 3: Floor - Rounding down the number of quantization steps (output signal is the nearest step towards -∞) 
- 4: Ceil - Rounding up the number of quantization steps (output signal is the nearest step towards +∞) 
Parameters
 
- Step - scalar, Quantization step - Properties : Type 'vec' of size 1. 
- Quantization Type - scalar with possible values 1,2,3 or 4: the method of quantization used (respectively Truncation, Floor or Ceil) - Properties : Type 'vec' of size 1. 
Default properties
- always active: no 
- direct-feedthrough: yes 
- zero-crossing: no 
- mode: no 
- regular inputs: - - port 1 : size [-1,1] / type 1 
- regular outputs: - - port 1 : size [-1,1] / type 1 
- number/sizes of activation inputs: 0 
- number/sizes of activation outputs: 0 
- continuous-time state: no 
- discrete-time state: no 
- object discrete-time state: no 
- name of computational function: qzrnd 
Examples
Example of a sine quantized every 0.2 step with the Ceil method (using the ceil value between two steps):


Comparison of the different quantization modes:


Interfacing function
- SCI/modules/scicos_blocks/macros/NonLinear/QUANT_f.sci 
Computational function
- SCI/modules/scicos_blocks/src/fortran/qzrnd.f
- SCI/modules/scicos_blocks/src/fortran/qztrn.f
- SCI/modules/scicos_blocks/src/fortran/qzflr.f
- SCI/modules/scicos_blocks/src/fortran/qzcel.f
| Report an issue | ||
| << Signalprocessing_pal | Signal processing palette | SAMPHOLD_m >> |