📄 bisynt3.m
字号:
function bsy = bisynt3(an,lpf,hpf)
%sy= bisynt3(sub,lpf,hpf) takes the one level
%subband decomposed signal sub and reconstructs
%the original signal using a synthesis filter bank
%defined by lpf and hpf. The filters are WSS and
%the extensions are accordingly defined. The signal
%is odd length. The result is returned to array sy.
%The subbands are symmetrically extended.
%
%This routine is used by synthw for reconstruction of
%wavelet decomposed sequences.
%
%Author: Ajit S. Bopardikar
%Copyright (c) 1998 by Addison Wesley Longman, Inc.
%
l = length(an);
ll = length(lpf);
lh = length(hpf);
le = (ll-1)/2;
he = (lh-1)/2;
%isolate the subbands
if (le/2 == round(le/2)) %analysis lpf has odd group delay
lo = an(1:floor(l/2));
hi = an(floor(l/2)+1:l);
%upsample
lu = zeros([1,l]);
hu = zeros([1 l]);
lu(2:2:l) = lo;
hu(1:2:l) = hi;
el = [lu(le+1:-1:2) lu lu(l-1:-1:max(1,l-le-1))]; %symmetric extension
eh = [hu(he+1:-1:2) hu hu(l-1:-1:max(1,l-he-1))]; %symmetric extension
r0 = conv(el,lpf);
r1 = conv(eh,hpf);
elseif (he/2 == round(he/2)) %analysis lpf has even group delay
lo = an(1:ceil(l/2));
hi = an(ceil(l/2)+1:l);
%upsample
lu = zeros([1,l]);
hu = zeros([1 l]);
lu(1:2:l) = lo;
hu(2:2:l) = hi;
el = [lu(le+1:-1:2) lu lu(l-1:-1:max(1,l-le-1))]; %symmetric extension
eh = [hu(he+1:-1:2) hu hu(l-1:-1:max(1,l-he-1))]; %symmetric extension
r0 = conv(el,lpf);
r1 = conv(eh,hpf);
end; %endif
bsy = r0(ll:l+ll-1)+ r1(lh:l+lh-1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -