Download Filter Design Toolbox User`s Guide

Transcript
nunderflows
Purpose
11nunderflows
Return the number of underflows from the most recent quantizer operation
Syntax
nunderflows(q)
Description
nunderflows(q) is the number of underflows during a call to quantize(q,...)
for quantizer object q. An underflow is defined as a number that is nonzero
before it is quantized, and zero after it is quantized. The number of underflows
accumulates over successive calls to quantize. Use the function reset(q) to
return nunderflows to zero.
Examples
q = quantizer('fixed','floor',[4 3]);
x = (0:eps(q)/4:2*eps(q))';
y = quantize(q,x);
nunderflows(q)
ans =
3
By looking at x and y, you can see which ones went to zero.
[x,y]
ans =
0
0.0313
0.0625
0.0938
0.1250
0.1563
0.1875
0.2188
0.2500
0
0
0
0
0.1250
0.1250
0.1250
0.1250
0.2500
11-109