comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function w3db = kaiser_w3db(alpha)
2
3 % KAISER_W3DB returns the 3dB bandwidth in bins of a kaiser window with
4 % parameter alpha.
5 %
6 % Taken from C code of Gerhard Heinzel:
7 %
8 % Compute the 3dB bandwidth (W3db) [bins]
9 % of Kaiser windows from the parameter alpha.
10 % Best-fit polynomial was obtained from 180 data
11 % points between alpha=1 and alpha=9.95.
12 % Maximum error is 0.006 bins.
13 %
14 % M Hewitson 19-05-07
15 %
16 % $Id: kaiser_w3db.m,v 1.2 2011/04/08 08:56:35 hewitson Exp $
17 %
18
19 a0 = 0.757185;
20 a1 = 0.377847;
21 a2 = -0.0238342;
22 a3 = 0.00086012;
23 x = alpha;
24 w3db = (((((a3 * x) + a2) * x) + a1) * x + a0);
25
26 % END