⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_anafb.m

📁 Sparse Signal Representation using Overlapping Frames (matlab toolbox)
💻 M
字号:
function Y = C_anafb(X, N, a0, a1)
% C_anafb   Tree structured analysis filter bank using IIR filter. 
%
% Y = C_anafb(X, N);
% Y = C_anafb(X, N, a0, a1);
% ---------------------------------------------------------------------------% arguments:
%  X        the signal to be filtered, a real column vector of size Lx1
%           L should have a factor N.
%  N        number of subbands, we should have N=2^k, k=1,2,..8, 
%           default value of N is 2. 
%  a0,a1    two optional parameters, give both or none.
%           These are the values of a0 and a1 used in the IIR filterbank.
% ---------------------------------------------------------------------------
%----------------------------------------------------------------------
% Copyright (c) 1998.  Karl Skretting.  All rights reserved.
% Hogskolen in Stavanger (Stavanger University), Signal Processing Group
% Mail:  karl.skretting@tn.his.no   Homepage:  http://www.ux.his.no/~karlsk/
% 
% HISTORY:
% Ver. 1.0  27.03.1998  Karl Skretting, used in Master thesis 1998, HIS: 
%                       "Kompresjon av seismiske data"
% Ver. 1.1  20.07.2000  KS: added optional arguments a0, a1
% Ver. 1.2  02.12.2002  KS: moved from ..\Frames to ..\FrameTools
%----------------------------------------------------------------------

Mfile='C_anafb';

% check input and output arguments, and assign values to arguments
if (nargin < 1); 
   error([Mfile,': function must have one input argument, see help.']); 
end
if (nargin < 2)
   N=2;
end
if (nargin < 4)
   % the default values
   a0=0.1576056086;
   a1=0.6148404766;
end

if (isempty(find([2,4,8,16,32,64,128,256]==N)))
   error([Mfile,': illegal value of N, see help.']); 
end
[L,M]=size(X);
if (M ~= 1)
   error([Mfile,': X should be a column vector, see help.']); 
end
if (rem(L,N) ~= 0)
   error([Mfile,': length of X should have a factor N, see help.']); 
end
disp([Mfile,': Split into ',int2str(N),' subband ... ']);

K=log2(N);

Y=X;
for k=1:K
   Y=C_ana(Y,a0,a1);
   % switch columns to sort by frequency
   Bytt=0;
   for i=1:2:size(Y,2)
      if (Bytt)
         y=Y(:,i);
         Y(:,i)=Y(:,i+1);
         Y(:,i+1)=y;
      end
      Bytt = ~Bytt;
   end
end

return

⌨️ 快捷键说明

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