| Filter Design Toolbox | ![]() |
Return the word length for a quantizer
Syntax
wordlength(q)
Description
wordlength(q) returns the word length of quantizer q.
Examples
q = quantizer([16 15]); wordlength(q)
Even though the word length can be read in two stages,
q = quantizer([16 15]); fmt = q.format; w = fmt(1);
it is handy to have it available for use in equations. For example, the algorithm for realmax(q) when q is a signed fixed-point quantizer (q.mode = 'fixed') is
q = quantizer('fixed',[8 4]);
r = pow2(wordlength(q) - fractionlength(q) - 1) - eps(q)
See Also
fractionlength Return the exponent length of a quantizer.
exponentlength Return the fraction length for a quantizer.
| unitquantizer | zerophase | ![]() |