-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_taper_func.m
68 lines (59 loc) · 1.62 KB
/
get_taper_func.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function varargout = get_taper_func(varargin);
%%
%% 'get_taper_func'
%%
%% list available Matlab taper functions
%% that take only taper length as an input
%% argument;
%% return the function handle for a given
%% taper function name
%%
%% syntax:
%% -------
%% taper_name_list = get_taper_func;
%% taper_function_handle = get_taper_func(taper_function_name);
%%
%% input:
%% ------
%% taper_function_name == taper function name string
%%
%% output:
%% -------
%% taper_function_handle == function handle corresponding to
%% taper name
%%
%% K. A. Cortopassi, April 2004
%%
name_list{1} = 'Bartlett-Hann';
name_list{2} = 'Bartlett';
name_list{3} = 'Blackman' ;
name_list{4} = 'Blackman-Harris';
name_list{5} = 'Bohman';
name_list{6} = 'Flat Top';
name_list{7} = 'Gaussian';
name_list{8} = 'Hamming';
name_list{9} = 'Hann';
name_list{10} = 'Nuttall Blackman-Harris';
name_list{11} = 'Parzen de la Valle-Poussin';
name_list{12} = 'Rectangular';
name_list{13} = 'Triangular';
function_list{1} = @barthannwin;
function_list{2} = @bartlett;
function_list{3} = @blackman;
function_list{4} = @blackmanharris;
function_list{5} = @bohmanwin;
function_list{6} = @flattopwin;
function_list{7} = @gausswin;
function_list{8} = @hamming;
function_list{9} = @hann;
function_list{10} = @nuttallwin;
function_list{11} = @parzenwin;
function_list{12} = @rectwin;
function_list{13} = @triang;
if ~length(varargin)
varargout{1} = name_list;
else
window_name = varargin{1};
varargout{1} = function_list{find(strcmpi(name_list, window_name))};
end
return;