comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function alpha = kaiser_alpha(req_psll)
2
3 % KAISER_ALPHA returns the alpha parameter that gives the required input
4 % PSLL.
5 %
6 % Taken from C code of Gerhard Heinzel:
7 %
8 % Compute the parameter alpha of Kaiser windows
9 % from the required PSLL [dB]. Best-fit polynomial
10 % was obtained from 180 data points between alpha=1
11 % and alpha=9.95. Maximum error is 0.05
12 % Maximum error for PSLL > 30 dB is 0.02
13 %
14 % M Hewitson 19-05-07
15 %
16 % $Id: kaiser_alpha.m,v 1.2 2011/04/08 08:56:36 hewitson Exp $
17 %
18
19
20 a0 = -0.0821377;
21 a1 = 4.71469;
22 a2 = -0.493285;
23 a3 = 0.0889732;
24
25 x = req_psll / 100;
26 alpha = (((((a3 * x) + a2) * x) + a1) * x + a0);
27
28
29 % END