Mercurial > hg > ltpda
diff m-toolbox/classes/@specwin/kaiser_w3db.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_w3db.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,26 @@ +function w3db = kaiser_w3db(alpha) + +% KAISER_W3DB returns the 3dB bandwidth in bins of a kaiser window with +% parameter alpha. +% +% Taken from C code of Gerhard Heinzel: +% +% Compute the 3dB bandwidth (W3db) [bins] +% 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.006 bins. +% +% M Hewitson 19-05-07 +% +% $Id: kaiser_w3db.m,v 1.2 2011/04/08 08:56:35 hewitson Exp $ +% + +a0 = 0.757185; +a1 = 0.377847; +a2 = -0.0238342; +a3 = 0.00086012; +x = alpha; +w3db = (((((a3 * x) + a2) * x) + a1) * x + a0); + +% END