I am using the Quantizer object as follows:
Q=quantizer([12 0],'fixed','round','saturate'); round([-1.5 1.5])
Here, I get the output as:
ans = -2 2
Now, if I use the QUANTIZE function as:
quantize(Q,[-1.5 1.5])
Here, I get the output as:
ans = -1 2
I would like to know why it is not quantizing with a 'Roundmode' of 'round' consistent with MATLAB's round function.
This occurred when I was trying to make my MATLAB fixed point code "bit-true" with a Xilinx Blockset model in Simulink.
Best Answer