| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Fixed-Point Toolbox |
| Contents | Index |
| Learn more about Fixed-Point Toolbox |
y = unitquantize(q, x)
[y1,y2,...] = unitquantize(q,x1,x2,...)
y = unitquantize(q, x) works the same as quantize except that numbers within eps(q) of +1 are made exactly equal to +1 .
[y1,y2,...] = unitquantize(q,x1,x2,...) is equivalent to
y1 = unitquantize(q,x1), y2 = unitquantize(q,x2),...
This example demonstrates the use of unitquantize with a quantizer object q and a vector x.
q = quantizer('fixed','floor','saturate',[4 3]);
x = (0.8:.1:1.2)';
y = unitquantize(q,x);
z = [x y]
e = eps(q)This quantization outputs an array containing the original values of x and the quantized values of x, followed by the value of eps(q):
z =
0.8000 0.7500
0.9000 1.0000
1.0000 1.0000
1.1000 1.0000
1.2000 1.0000
e =
0.1250eps, quantize, quantizer, unitquantizer

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |