quantize

Block Category: Nonlinear

Description: The quantize block is useful for simulating approximations of a continuously varying signal that possibly requires the use of an infinite number of values or levels by a discontinuous signal with a finite number of values.

The quantize block rounds the precision of input signal based on the signs of the input and the resolution. When the resolution is positive, the signal is rounded down to -. For example, 1.9 quantized to a resolution of 1 becomes 1, and -1.9 quantized to a resolution of 1 becomes 2. When the resolution is negative, the signal is rounded to +. For example, 1.1 quantized to a resolution of -1 becomes 2, and -1.1 quantized to a resolution of -1 becomes -1.

The quantize block is useful for simulations that involve the conversion of analog signals to digital signals.

Label: Indicates a user-defined block label that appears when View > Block Labels is activated.

Resolution: Specifies the value to which the input signal is rounded or truncated. The default is 0.05. You can also enter a value in hexadecimal notation or as a C expression.