MATLAB: Is it possible to use FLOOR or CEIL (instead of default ROUND) mode within the QUANTIZER-Block in Simulink

simulink

I would like to know if it is possible to use FLOOR or CEIL (instead of default ROUND) mode within the QUANTIZER-Block in Simulink.

Best Answer

The ability to use FLOOR or CEIL (instead of default ROUND) mode within the QUANTIZER-Block is not available in Simulink.
As a workaround, it is possible to simulate 'CEIL'and 'FLOOR' functionality by adding a bias block of value +half_the_quantization_interval (for ceil) or -half_the_quantization_interval (for floor), according to:
ceil(x/qi) = round((x + 0.5*qi)/qi)
floor(x/qi) = round((x - 0.5*qi)/qi)
where qi is the quantization interval.