Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Xcos > palettes > Signal processing palette > QUANT_f

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 -\infty)

  • 4: Ceil

    Rounding up the number of quantization steps (output signal is the nearest step towards +\infty)

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

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:
Thu Feb 14 14:57:38 CET 2019