syn1.m

来自「这是伯克里wavelet transforms一书中的例子的代码」· M 代码 · 共 30 行

M
30
字号
function sy1 =  syn1(x,lo,hi)
%syn1(an,lo,hi) takes the subband decomposed signal
%contained in an and reconstructs it using the filter
%bank made up of lo and hi. Orthonormal filter bank with 
%circular extension used.
%
%This routine is used by the routine synth for orthogonal wavelet
%synthesis.
%
%Author: Ajit S. Bopardikar
%Copyright (c) 1998 by Addison Wesley Longman, Inc.
%

  n = length(x);
  l = length(lo);
  
  ll = x(1:n/2);   %isolate the low pass subband
  hh = x(n/2+1:n); %isolate the high pass subband
  
  llext = [ll(n/2-l/2+1:n/2) ll]; %circular extension
  hhext = [hh(n/2-l/2+1:n/2) hh]; %circular extension

  upl = upsamp(llext,2);
  uph = upsamp(hhext,2);

  syn = conv(upl,lo)+conv(uph,hi); %synthesize 
  sy1 = syn(l+1:l+n);%pick out the original signal 
                     %from the synthesis signal.
  
     

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?