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

📄 bordex.m

📁 This toolbox contains Matlab files that implement the Laplacian pyramid (LP) decomposition and the
💻 M
字号:
function ind = bordex(n, lf, extmod, shift)% BORDEX   Border extend for perfect reconstruction filter banks%%       ind = bordex(n, lf, extmod, shift)%% Input:%   n:      signal length%   lf:     filter length%   extmod: extension mode (e.g. 'per' or 'sym')%   shift:  specifies the window over which filtering occurs%% Output:%   ind:    index for extended signal%% Note:%   The origin of the filter f is assumed to be floor(size(f)/2) + 1.%   Amount of shift should be no more than floor((size(f)-1)/2).% Amount of extension at two endse1 = floor((lf - 1) / 2) + shift;e2 = ceil((lf - 1) / 2) - shift;switch extmod    case 'per'        ind = [n-e1+1:n, 1:n, 1:e2];        if (n < e1) | (n < e2)            ind = mod(ind, n);            ind(ind==0) = n;        end            case 'sym'        ind = [1:n];        % Symmetrically extend left        while (e1 >= 2*n-2)            ind = [1:n-1, n:-1:2, ind];                        e1 = e1 - (2*n-2);        end        if (e1 < n)            ind = [e1+1:-1:2, ind];        else            ind = [2*n-1-e1:n-1, n:-1:2, ind];             end        % Symmetrically extend right        while (e2 >= 2*n-2)            ind = [ind, n-1:-1:1, 2:n];            e2 = e2 - (2*n-2);        end        if (e2 < n)            ind = [ind, n-1:-1:n-e2];        else            ind = [ind, n-1:-1:1, 2:e2-n+2];        end            otherwise        error('Invalid extension mode')        end

⌨️ 快捷键说明

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