This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Quantizer

Discrete input at given interval

  • Library:
  • Simulink / Discontinuities

Description

The Quantizer block passes the input signal through a stair-step function. Many neighboring points on the input axis are mapped to one point on the output axis. The effect quantizes a smooth signal into a stair-step output. The block uses a round-to-nearest method to produce an output that is symmetric about zero.

y = q * round(u/q) 

where y is the output, u the input, and q the Quantization interval parameter.

Ports

Input

expand all

The input signal to the quantization algorithm.

Data Types: single | double

Output

expand all

Output signal as quantized discrete values.

y = q * round(u/q) 

where y is the output, u the input, and q the Quantization interval parameter.

Data Types: single | double

Parameters

expand all

Specify the quantization interval used in the algorithm. Permissible output values for the Quantizer block are n*q, where n is an integer and q the Quantization interval.

Programmatic Use

Block Parameter: QuantizationInterval
Type: character vector
Value: Any real or complex value
Default: '0.5'

The linearization commands in Simulink® software treat this block as a gain in state space. Select this check box to cause the commands to treat the gain as 1. Clear the box to have the commands treat the gain as 0.

Programmatic Use

Block Parameter: LinearizeAsGain
Type: character vector
Value: 'off' | 'on'
Default: 'on'

Specify the sample time as a value other than -1. For more information, see Specify Sample Time.

Dependencies

This parameter is not visible unless it is explicitly set to a value other than -1. To learn more, see Blocks for Which Sample Time Is Not Recommended.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: scalar
Default: '-1'

Block Characteristics

Data Types

double | single

Direct Feedthrough

yes

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a