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

📄 vanishing_num.m

📁 MATLAB Code for Optimal Quincunx Filter Bank Design Yi Chen July 17, 2006 This file introduces t
💻 M
字号:
function N = Vanishing_num(h)
% compute the number of vanishing moments by the nubmer of zeros at the
% origin of the highpass frequency response
% input:  h -- highpass filter coefficients
% output: N -- order of at the origin
% Copyright (c) 2006 Yi Chen

% check the vanishing moments
N = 1;
hx(1) = 0;

sizeh = size(h);
n0 = -(sizeh(1)-1)/2:(sizeh(1)-1)/2;
n1 = -(sizeh(2)-1)/2:(sizeh(2)-1)/2;
[n1,n0] = meshgrid(n1,n0);
ind = 1;

while max(abs(hx)) < 1e-3    
    for j = 0:N-1
        for k = 0:j;
            matrix_h = (n0.^k).*(n1.^(j-k));
            hx(ind) = sum(sum(matrix_h.*h));
            ind = ind + 1;
        end
    end
    ind = 1;
    N = N + 1;
end

N = N - 2;
hx = hx(:)';

⌨️ 快捷键说明

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