view m-toolbox/classes/@specwin/kaiser_flatness.m @ 35:4be5f7a5316f database-connection-manager

Suppress output messages on preferences loading and saving
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

function flatness = kaiser_flatness(alpha)

% KAISER_FLATNESS returns the flatness in dB of the central bin of a kaiser 
% window with parameter alpha.
% 
% Taken from C code of Gerhard Heinzel:
% 
%    Compute the flatness in the central bin [dB]
%    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.013 dB.
% 
% M Hewitson 19-05-07
% 
% $Id: kaiser_flatness.m,v 1.2 2011/04/08 08:56:36 hewitson Exp $
% 

a0       = 0.141273;
a1       = 0.262425;
a2       = 0.00642551;
a3       = -0.000405621;
x        = alpha;
flatness =  -1. / (((((a3 * x) + a2) * x) + a1) * x + a0);

% END