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

📄 anal21.m

📁 这是伯克里wavelet transforms一书中的例子的代码
💻 M
字号:
function an = anal21(data,lpf,hpf)
%anal21(data,lpf,hpf) decomposes the input matrix, data, into
%four subbands using filters lpf and hpf. This is a one level 
%decomposition. Orthonormal filter banks used with circular extension.
%
%This routine is used by the routine, anal2d for 2-D wavelet 
%decomposition. 
%
%Author: Ajit S. Bopardikar
%Copyright (c) 1998 by Addison Wesley Longman, Inc.
%
  l = length(lpf);
  [m,n] = size(data);

  ext = [data data(:,1:l)]; %circular extension of rows

  ll = conv2(ext,lpf); % Low pass filtering of rows
  hh = conv2(ext,hpf); % High pass filtering of rows

  ll = ll(:, l:2:(l+n-1)); %choose the circular convolved part
  hh = hh(:, l:2:(l+n-1)); %and downsample by two.

  anr = [ll hh]'; %the row convolutions are done.
   
  ext = [anr anr(:,1:l)]; %circular extension of columns

  ll = conv2(ext,lpf); % Low pass filtering of columns
  hh = conv2(ext,hpf); % High pass filtering of columns

  ll = ll(:, l:2:(l+m-1)); %choose the circular convolved part
  hh = hh(:, l:2:(l+m-1)); %and downsample by two.

  an = [ll,hh]'; %One level of subband decomposition done.   
 

⌨️ 快捷键说明

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