Filter Design Toolbox    
fractionlength

Return the fraction length for a quantizer

Syntax

Description

f = fractionlength(q) returns the fraction length of quantizer q. This is useful because fraction length is valid whether the quantizer mode is floating-point or fixed-point.

Examples

For a floating-point quantizer

returns .

For a fixed-point quantizer

returns f = 4.

Algorithm

For floating-point quantizers, f = w - e - 1, where w is the word length and e is the exponent length.

For fixed-point quantizers, f is part of the format [w f].

See Also
quantizer


  firnyquist freqz 

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS