comparison m-toolbox/classes/@specwin/win_sft3m.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 % WIN_SFT3M returns SFT3M window, with N points.
2 % If mode == 'define', the window values will be empty and all the features
3 % If mode == 'build', the window values will be calculate%
4 % M Hewitson 18-05-07
5 %
6 % $Id: win_sft3m.m,v 1.5 2011/05/25 07:30:09 mauro Exp $
7 %
8
9 function varargout = win_sft3m(w, mode, N)
10
11 switch lower(mode)
12
13 case 'build'
14 n_args = nargin;
15 if n_args < 3
16 N = w.len;
17 end
18 % Calculate the values of the window
19 z = [0:N-1]./N * 2 * pi;
20 varargout{1} = 0.28235 - 0.52105 * cos (z) + 0.19659 * cos (2 * z);
21
22 case 'define'
23 % Make window struct
24 w.type = 'SFT3M';
25 w.alpha = 0;
26 w.psll = 44.2;
27 w.rov = 65.5;
28 w.nenbw = 2.9452;
29 w.w3db = 2.9183;
30 w.flatness = -0.0115;
31 w.len = N;
32 w.skip = 0;
33
34 varargout{1} = w;
35 end
36
37 % END