1 ## Copyright (C) 1995, 1996, 1997 Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
2 ## Copyright (C) 2000 Paul Kienzle <pkienzle@users.sf.net>
4 ## This program is free software; you can redistribute it and/or modify it under
5 ## the terms of the GNU General Public License as published by the Free Software
6 ## Foundation; either version 3 of the License, or (at your option) any later
9 ## This program is distributed in the hope that it will be useful, but WITHOUT
10 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 ## You should have received a copy of the GNU General Public License along with
15 ## this program; if not, see <http://www.gnu.org/licenses/>.
17 ## usage: kaiser (L, beta)
19 ## Returns the filter coefficients of the L-point Kaiser window with
22 ## For the definition of the Kaiser window, see A. V. Oppenheim &
23 ## R. W. Schafer, "Discrete-Time Signal Processing".
25 ## The continuous version of width L centered about x=0 is:
27 ## besseli(0, beta * sqrt(1-(2*x/L).^2))
28 ## k(x) = -------------------------------------, L/2 <= x <= L/2
31 ## See also: kaiserord
33 function w = kaiser (L, beta = 0.5)
37 elseif !(isscalar (L) && (L == round (L)) && (L > 0))
38 error ("kaiser: L has to be a positive integer");
39 elseif !(isscalar (beta) && (beta == real (beta)))
40 error ("kaiser: beta has to be a real scalar");
48 k = 2 * beta / m * sqrt (k .* (m - k));
49 w = besseli (0, k) / besseli (0, beta);
55 %! % use demo("kaiserord");