获取可用的小波函数列表

时间:2014-06-14 16:41:21

标签: matlab wavelet

在Matlab中,我可以使用waveletfamilies来显示每个族中所有可用小波的名称,但我更希望有一个可用的小波函数列表,以便我可以在我的脚本中迭代它。这样的列表是否存在于Matlab中,还是我必须手动创建它?

1 个答案:

答案 0 :(得分:2)

我为此创建了一个函数:

function [ wavelet_names ] = get_all_wavelet_names(  )
%GET_ALL_WAVELET_NAMES Get a list of available wavelet functions

%% Construct a cell array containing all the wavelet names
wavelet_haar_names = {'haar'};
wavelet_db_names = {'db1'; 'db2'; 'db3'; 'db4'; 'db5'; 'db6'; 'db7'; 'db8'; 'db9'; 'db10'};
wavelet_sym_names = {'sym2'; 'sym3'; 'sym4'; 'sym5'; 'sym6'; 'sym7'; 'sym8'};
wavelet_coif_names = {'coif1'; 'coif2'; 'coif3'; 'coif4'; 'coif5'};
wavelet_bior_names = {'bior1.1'; 'bior1.3'; 'bior1.5'; 'bior2.2'; 'bior2.4'; 'bior2.6'; 'bior2.8'; 'bior3.1'; 'bior3.3'; 'bior3.5'; 'bior3.7'; 'bior3.9'; 'bior4.4'; 'bior5.5'; 'bior6.8'};
wavelet_rbior_names = {'rbio1.1'; 'rbio1.3'; 'rbio1.5'; 'rbio2.2'; 'rbio2.4'; 'rbio2.6'; 'rbio2.8'; 'rbio3.1'; 'rbio3.3'; 'rbio3.5'; 'rbio3.7'; 'rbio3.9'; 'rbio4.4'; 'rbio5.5'; 'rbio6.8'};
wavelet_meyer_names = {'meyr'};
wavelet_dmeyer_names = {'dmey'};
wavelet_gaus_names = {'gaus1'; 'gaus2'; 'gaus3'; 'gaus4'; 'gaus5'; 'gaus6'; 'gaus7'; 'gaus8'};
wavelet_mexh_names = {'mexh'};
wavelet_morl_names = {'morl'};
wavelet_cgau_names = {'cgau1'; 'cgau2'; 'cgau3'; 'cgau4'; 'cgau5'};
wavelet_shan_names = {'shan1-1.5'; 'shan1-1'; 'shan1-0.5'; 'shan1-0.1'; 'shan2-3'};
wavelet_fbsp_names = {'fbsp1-1-1.5'; 'fbsp1-1-1'; 'fbsp1-1-0.5'; 'fbsp2-1-1'; 'fbsp2-1-0.5'; 'fbsp2-1-0.1'};
wavelet_cmor_names = {'cmor1-1.5'; 'cmor1-1'; 'cmor1-0.5'; 'cmor1-1'; 'cmor1-0.5'; 'cmor1-0.1'};

% Concatenate all wavelet names into a single cell array 
wavelet_categories_names = who('wavelet*names');
wavelet_names = {};
for wavelet_categories_number=1:size(wavelet_categories_names,1)
    temp = wavelet_categories_names(wavelet_categories_number);
    temp = eval(temp{1});
    wavelet_names = vertcat(wavelet_names, temp);
end


end

它返回R2014a中不需要数学符号工具箱的所有小波,即我们排除未在http://www.mathworks.com/help/wavelet/ref/waveletfamilies.html上明确列出的小波名称,如高斯**,db **等:< / p>

'bior1.1'
'bior1.3'
'bior1.5'
'bior2.2'
'bior2.4'
'bior2.6'
'bior2.8'
'bior3.1'
'bior3.3'
'bior3.5'
'bior3.7'
'bior3.9'
'bior4.4'
'bior5.5'
'bior6.8'
'cgau1'
'cgau2'
'cgau3'
'cgau4'
'cgau5'
'cmor1-1.5'
'cmor1-1'
'cmor1-0.5'
'cmor1-1'
'cmor1-0.5'
'cmor1-0.1'
'coif1'
'coif2'
'coif3'
'coif4'
'coif5'
'db1'
'db2'
'db3'
'db4'
'db5'
'db6'
'db7'
'db8'
'db9'
'db10'
'dmey'
'fbsp1-1-1.5'
'fbsp1-1-1'
'fbsp1-1-0.5'
'fbsp2-1-1'
'fbsp2-1-0.5'
'fbsp2-1-0.1'
'gaus1'
'gaus2'
'gaus3'
'gaus4'
'gaus5'
'gaus6'
'gaus7'
'gaus8'
'haar'
'mexh'
'meyr'
'morl'
'rbio1.1'
'rbio1.3'
'rbio1.5'
'rbio2.2'
'rbio2.4'
'rbio2.6'
'rbio2.8'
'rbio3.1'
'rbio3.3'
'rbio3.5'
'rbio3.7'
'rbio3.9'
'rbio4.4'
'rbio5.5'
'rbio6.8'
'shan1-1.5'
'shan1-1'
'shan1-0.5'
'shan1-0.1'
'shan2-3'
'sym2'
'sym3'
'sym4'
'sym5'
'sym6'
'sym7'
'sym8'

请注意waveletfamilies()调用wavemngr(),其中包含:

famtype = ...
           {...
            1, 'Haar',         'haar',  1;
            2, 'Daubechies',   'db',    1;
            3, 'Symlets',      'sym',   1;
            4, 'Coiflets',     'coif',  1;
            5, 'BiorSplines',  'bior',  2;
            6, 'ReverseBior',  'rbio',  2;
            7, 'Meyer',        'meyr',  3;
            8, 'DMeyer',       'dmey',  1;
            9, 'Gaussian',     'gaus',  4;
           10, 'Mexican_hat',  'mexh',  4;
           11, 'Morlet',       'morl',  4;
           10, 'Complex Gaussian',   'cgau',  5;
           11, 'Shannon',            'shan',  5;
           10, 'Frequency B-Spline', 'fbsp',  5;
           11, 'Complex Morlet',     'cmor',  5

            };

        nums = ...
           {...
            '';
            '1 2 3 4 5 6 7 8 9 10 **';
            '2 3 4 5 6 7 8 **';
            '1 2 3 4 5';
            '1.1 1.3 1.5 2.2 2.4 2.6 2.8 3.1 3.3 3.5 3.7 3.9 4.4 5.5 6.8';
            '1.1 1.3 1.5 2.2 2.4 2.6 2.8 3.1 3.3 3.5 3.7 3.9 4.4 5.5 6.8';
            '';
            '';
            '1 2 3 4 5 6 7 8 **';
            '';
            '';
            '1 2 3 4 5 **';
            '1-1.5 1-1 1-0.5 1-0.1 2-3 **';
            '1-1-1.5 1-1-1 1-1-0.5 2-1-1 2-1-0.5 2-1-0.1 **';
            '1-1.5 1-1 1-0.5 1-1 1-0.5 1-0.1 **'
            };

        typNums = ...
           {...
            'no';
            'integer';
            'integer';
            'integer';
            'real';
            'real';
            'no';
            'no';
            'integer';
            'no';
            'no';
            'integer';
            'string';
            'string';
            'string'
            };

        files = ...
           {...
            'dbwavf';
            'dbwavf';
            'symwavf';
            'coifwavf';
            'biorwavf';
            'rbiowavf';
            'meyer';
            'dmey.mat';
            'gauswavf';
            'mexihat';
            'morlet'
            'cgauwavf';
            'shanwavf';
            'fbspwavf';
            'cmorwavf'
            };

        bounds = ...
           {...
            [];
            [];
            [];
            [];
            [];
            [];
            [-8 8];
            [];
            [-5 5];
            [-8 8];
            [-8 8];
            [-5 5];
            [-20 20];
            [-20 20];
            [-8 8]
            };

仅供参考:How does the choice of the wavelet function impact the speed of cwt()?