waverecc.m

来自「为stanford大学donoho教授所编写的redgit变换源代码。是用c编写」· M 代码 · 共 39 行

M
39
字号
function a = waverecc(c, l, wname)
% WAVERECC Multi-level column-wise 1-D wavelet reconstruction.
%
% Same as apply WAVEREC for each column.
%
% See also:	WAVEDECC, WAVEREC

rmax = length(l);
nmax = rmax - 2;

[LoF_R, HiF_R] = wfilters(wname, 'r');

% Initialization.
a = c(1:l(1), :);

% Iterated reconstruction.
imax = rmax + 1;
for k = nmax:-1:1
    d = detcoefc(c, l, k);		% extract detail
    a = idwtc(a, d, LoF_R, HiF_R, l(imax-k));
end


%----------------------------------------------------------------------------%
% Internal Function(s)
%----------------------------------------------------------------------------%
function d = detcoefc(c, l, n)
% Same as DETCOEF for column-wise.

rmax = length(l);
nmax = rmax - 2;

% Extract detail coefficients.
k     = rmax - n;
first = sum(l(1:k-1)) + 1;
last  = first + l(k) - 1;
d     = c(first:last, :);
%----------------------------------------------------------------------------%

⌨️ 快捷键说明

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