KAISER_FLATNESS returns the flatness in dB of the central bin of a kaiser window with parameter alpha. Taken from C code of Gerhard Heinzel: Compute the flatness in the central bin [dB] of Kaiser windows from the parameter alpha. Best-fit polynomial was obtained from 180 data points between alpha=1 and alpha=9.95. Maximum error is 0.013 dB. M Hewitson 19-05-07 $Id: kaiser_flatness.m,v 1.1 2007/05/19 09:04:59 hewitson Exp $
0001 function flatness = kaiser_flatness(alpha) 0002 0003 % KAISER_FLATNESS returns the flatness in dB of the central bin of a kaiser 0004 % window with parameter alpha. 0005 % 0006 % Taken from C code of Gerhard Heinzel: 0007 % 0008 % Compute the flatness in the central bin [dB] 0009 % of Kaiser windows from the parameter alpha. 0010 % Best-fit polynomial was obtained from 180 data 0011 % points between alpha=1 and alpha=9.95. 0012 % Maximum error is 0.013 dB. 0013 % 0014 % M Hewitson 19-05-07 0015 % 0016 % $Id: kaiser_flatness.m,v 1.1 2007/05/19 09:04:59 hewitson Exp $ 0017 % 0018 0019 a0 = 0.141273; 0020 a1 = 0.262425; 0021 a2 = 0.00642551; 0022 a3 = -0.000405621; 0023 x = alpha; 0024 flatness = -1. / (((((a3 * x) + a2) * x) + a1) * x + a0); 0025 0026 % END