Mercurial > hg > ltpda
comparison m-toolbox/classes/@specwin/kaiser_flatness.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 flatness = kaiser_flatness(alpha) | |
2 | |
3 % KAISER_FLATNESS returns the flatness in dB of the central bin of a kaiser | |
4 % window with parameter alpha. | |
5 % | |
6 % Taken from C code of Gerhard Heinzel: | |
7 % | |
8 % Compute the flatness in the central bin [dB] | |
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.013 dB. | |
13 % | |
14 % M Hewitson 19-05-07 | |
15 % | |
16 % $Id: kaiser_flatness.m,v 1.2 2011/04/08 08:56:36 hewitson Exp $ | |
17 % | |
18 | |
19 a0 = 0.141273; | |
20 a1 = 0.262425; | |
21 a2 = 0.00642551; | |
22 a3 = -0.000405621; | |
23 x = alpha; | |
24 flatness = -1. / (((((a3 * x) + a2) * x) + a1) * x + a0); | |
25 | |
26 % END |