Mercurial > hg > ltpda
diff m-toolbox/classes/@specwin/kaiser_alpha.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@specwin/kaiser_alpha.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,29 @@ +function alpha = kaiser_alpha(req_psll) + +% 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.2 2011/04/08 08:56:36 hewitson Exp $ +% + + +a0 = -0.0821377; +a1 = 4.71469; +a2 = -0.493285; +a3 = 0.0889732; + +x = req_psll / 100; +alpha = (((((a3 * x) + a2) * x) + a1) * x + a0); + + +% END