📄 lpd.m
字号:
function y = lpd(x, pfilt, nlev)% LPD Multi-level Laplacian pyramid decomposition%% y = lpdecn(x, pfilt, nlev)%% Input:% x: input signal (of any dimension)% pfilt: pyramid filter name (see PFILTERS)% nlev: number of decomposition level%% Output:% y: output in a cell vector from coarse to fine layers%% See also: LPR%% Note: 1-D input signals have to be in column vectorsnd = ndims(x);sx = size(x);% Consider column vectors as 1-D signals if nd == 2 & sx(2) == 1 nd = 1;endif (nd == 1 & log2(sx(1)) < nlev) | (nd > 1 & min(log2(sx)) < nlev) error('Too many decomposition levels');end % Get the pyramidal filters from the filter name[h, g] = pfilters(pfilt);% Decide extension modeswitch pfilt case {'9-7', '9/7', '5-3', '5/3', 'Burt'} extmod = 'sym'; otherwise extmod = 'per'; endy = cell(1, nlev+1);for n = 1:nlev [x, y{nlev-n+2}] = lpdec1(x, nd, h, g, extmod);endy{1} = x;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -