Code covered by the BSD License  

Highlights from
Legendre wavelets

Legendre wavelets

by

 

installing Legendre wavelets in the MATLAB wavelet toolbox.

legdwavf(wname)
function  F = legdwavf(wname)
%LEGDWAVF Legendre wavelet filters.
% F = LEGDWAVF(W) returns the scaling filter associated with 
% Legendre wavelet specified by the string W where W='legdN'.
% Possible values for N are:
% N = 1, 2, 3, ..., 9.
% see also WAVEINFO, WFILTERS

% Milde M.S. Lira & Helio M. de Oliveira, version 15-Oct-02

% Check arguments.
if errargn(mfilename,nargin,[0,1],nargout,[0:1]), error('*'); end
num=wstr2num(wname(5));
 
switch num
    case 1
    F = [0.50000000 0.5000000000];
    case 2
    F = [0.31249999983 0.1875000000 0.1875000000 0.31249999983];
    case 3
    F = [0.24609375 0.13671875 0.11718750 0.11718750 0.13671875 0.24609375];
    case 4
    F = [0.148119536 0.079756673 0.06525546 0.060421722 0.060421722 0.06525546 0.079756673 0.148119536];
    case 5
    F = [0.131147506 0.069431033 0.055544826 0.04984792 0.047582106 ...
         0.047582106 0.04984792 0.055544826 0.069431033 0.131147506];
    case 6
    F = [0.154981 0.08059013 0.06307054 0.05506158 0.05071461 0.04832804 0.04725409 ...
         0.04725409 0.04832804 0.05071461 0.05506158 0.06307054 0.08059013 0.154981];
    case 7
     F = [0.1444644 0.07472299 0.05811788 0.05036883 0.04598893 0.04336099 0.04183955 0.04113637 ...
          0.04113637 0.04183955 0.04336099 0.04598893 0.05036883 0.05811788 0.07472299 0.1444644];
    case 8
    F = [0.1358338 0.06997497 0.05417417 0.04670187 0.04237762 0.03966545 0.03794087 0.03690846 0.03642283 ...
         0.03642283 0.03690846 0.03794087 0.03966545 0.04237762 0.04670187 0.05417417 0.06997497 0.1358338];
    case 9
    F = [0.1285853 0.0660303 0.05093766 0.04373435 0.0395929 0.03677772 0.03496154 0.03376286 0.03302888 0.03267937  ...
         0.03267937 0.03302888 0.03376286 0.03496154 0.03677772 0.0395929 0.04373435 0.05093766 0.0660303 0.1285853 ];
    otherwise
    errargt(mfilename,'Invalid Legendre wavelet number !','msg');
    error('*');
end

Contact us