Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Português


QUANT_f

Quantization

Block Screenshot

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 Signalprocessing_pal SAMPHOLD_m >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:53:28 CEST 2024