KAISER_ALPHA returns the alpha parameter that gives the required input PSLL. Taken from C code of Gerhard Heinzel: Compute the parameter alpha of Kaiser windows from the required PSLL [dB]. Best-fit polynomial was obtained from 180 data points between alpha=1 and alpha=9.95. Maximum error is 0.05 Maximum error for PSLL > 30 dB is 0.02 M Hewitson 19-05-07 $Id: kaiser_alpha.m,v 1.1 2008/06/20 10:46:54 hewitson Exp $
0001 function alpha = kaiser_alpha(req_psll) 0002 0003 % KAISER_ALPHA returns the alpha parameter that gives the required input 0004 % PSLL. 0005 % 0006 % Taken from C code of Gerhard Heinzel: 0007 % 0008 % Compute the parameter alpha of Kaiser windows 0009 % from the required PSLL [dB]. Best-fit polynomial 0010 % was obtained from 180 data points between alpha=1 0011 % and alpha=9.95. Maximum error is 0.05 0012 % Maximum error for PSLL > 30 dB is 0.02 0013 % 0014 % M Hewitson 19-05-07 0015 % 0016 % $Id: kaiser_alpha.m,v 1.1 2008/06/20 10:46:54 hewitson Exp $ 0017 % 0018 0019 0020 a0 = -0.0821377; 0021 a1 = 4.71469; 0022 a2 = -0.493285; 0023 a3 = 0.0889732; 0024 0025 x = req_psll / 100; 0026 alpha = (((((a3 * x) + a2) * x) + a1) * x + a0); 0027 0028 0029 % END