-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetParamFor.m
48 lines (43 loc) · 1014 Bytes
/
setParamFor.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% FILE: setParamFor.m
%
% FUNCTION: setParamFor
%
% CALL: wn_param = setParamFor(Wn)
%
% Returns the default parameters for the given window
%
% INPTUS:
% Wn - a window name
% VALUES FOR Wn must be one of those bellow:
% boxcar
% triang
% blackman
% chebwin
% hamming
% hanning
% kaiser
% lanczos
% tukeywin
%
% OUTPUTS:
% wn_param - the default parameters for the given window
%
%
%
% Author: Leonard-Gabriel Necula
% Created: December 24 2020
% Updated: January 18 2021
function wc_param = setParamFor(Wn)
switch Wn
case 'chebwin'
wc_param = 90;
case 'kaiser'
wc_param = 6;
case 'lanczos'
wc_param = 2;
case 'tukeywin'
wc_param = 75;
otherwise
disp('Error. Window type does not require an extra parameter');
end
end