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

📄 afb.m

📁 Double Density Wavelet Soft
💻 M
字号:
function [lo, bp, hi] = afb(x, af)

% ANALYSIS FILTER BANK
%    with cyclic convolution
% [lo, bp, hi] = afb(x, af)
% INPUT
%   x  : input signal (even-length)
%   af : analysis filters% OUTPUT
%   lo : lowpass subband signal
%   bp : bandpass subband signal
%   hi : highpass subband signal
h0 = af(:,1);   % lowpass filterh1 = af(:,2);   % bandpass filterh2 = af(:,3);   % highpass filter
L = length(x);     % length of input signal
% --- lowpass channel ---
lo = conv(x,h0);   % filter with h0
lo = lo(1:2:end);  % downsample

% wrap the tail to the front.
k = 1:(length(lo)-L/2);
lo(k) = lo(k) + lo(L/2+k);
lo = lo(1:L/2);

% --- bandpass channel ---
bp = conv(x,h1);   % filter with h1
bp = bp(1:2:end);  % downsample

% wrap the tail to the front.
k = 1:(length(bp)-L/2);
bp(k) = bp(k) + bp(L/2+k);
bp = bp(1:L/2);

% --- highpass channel ---
hi = conv(x,h2);   % filter with h2

% wrap the tail to the front.
k = 1:(length(hi)-L);
hi(k) = hi(k) + hi(L+k);
hi = hi(1:L);

⌨️ 快捷键说明

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