bianal3.m
来自「这是伯克里wavelet transforms一书中的例子的代码」· M 代码 · 共 38 行
M
38 行
function biodd = bianal3(data,lpf,hpf)
%bianal3(data,lpf,hpf) effects a one level decomposition of
%of the input signal, data, using the biorthogonal filter bank
%defined by filters lpf and hpf. The filters are assumed to be
%WSS and the extension is WSS symetric extension. The length of
%data is odd.
%
%This routine is used by analw for biorthogonal wavelet decomposition.
%
%Author: Ajit S. Bopardikar
%Copyright (c) 1998 by Addison Wesley Longman, Inc.
%
l = length(data);
ll = length(lpf);
lh = length(hpf);
le = (ll-1)/2; %extension length
he = (lh-1)/2; %extension length
if (ll>lh) %if the lpf has even group delay
d0 = 0;
d1 = 1;
elseif (lh>ll) %if the hpf has even group delay
d0 = 1;
d1 = 0;
end; %endif
ext = [data(le+1:-1:2) data data(l-1:-1:l-le-1)]; %extension
lp = conv(ext,lpf);
biodd = lp(ll+d0:2:l+ll-1); %lowpass subband
ext = [data(he+1:-1:2) data data(l-1:-1:l-he-1)]; %extension
lp = conv(ext,hpf);
biodd = [biodd lp(lh+d1:2:l+lh-1)]; %the subband decomposed signal
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?