Quantization

This block implements a quantizer. The output is obtained from the input according to a choice of methods: round, truncation, floor or ceil. When fed with a smooth signal, the block produces a stair-step signal.

    Quantization

Library

Activate/Hybrid

Description

The Quantization block implements a quantizer. The output is obtained from the input according to a choice of methods : round , truncation , floor , ceil , or round2 methods. When fed with a smooth signal, it produces a stair-step signal.

Parameters

Quantization_0

NameLabelDescriptionData TypeValid Values

step

Quantization step

Quantization step. Real scalar value. Default 0.1.

Matrix

method

Quantization type

Quantization method : round, truncation, floor, ceil, round2. Round : step*ceil(u/step-0.5) Tranc : step*((int)(u/step)) Ceil : step*ceil(u/step) floor : step*floor(u/step) Round2: step * ((u < 0.) ? ((int) (u/ step + .5) - .5): ((int)(u/ step - .5) + .5)) The input data type should be double.

String

'Round'
'Truncation'
'Floor'
'Ceil'
'Round2'

externalActivation

External activation

Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

input

1

Port 2

explicit

output

1

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

yes

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no