piwt_ym.m

来自「beamlet变化的工具箱」· M 代码 · 共 100 行

M
100
字号
function u = PIWT_YM(w,C,deg)
% IWT_YM -- Partial Inverse Wavelet Transform (periodized Meyer Wavelet)
%  Usage
%    u = PIWT_YM(wc,L,deg)
%  Inputs
%    wc   1-d wavelet transform, length(wc) = 2^J.
%    L    Coarsest Level of V_0;  L << J
%    deg  degree of polynomial window 2 <= deg <=4
%  Outputs
%    u    unbiased Fourier Transform of reconstruction; length(u) = 2^J
%
%  Description
%    The Meyer wavelet transform is typically obtained by the command
%        wc = FWT_YM(x,L,deg)
%    to reconstruct x, use the IWT_YM.
%
%    The Meyer wavelet is defined in the frequency domain.
%    The algorithm is very different from usual quadrature
%    mirror filter algorithms.  See the Ph. D. Thesis of
%    Eric Kolaczyk.
%
%	 This is a variant of the IWT_YM algorithm based on the assumption
%	 that one wants to end up in the frequency domain; in particular
%	 to reconstruct the unbiased Fourier transform of the original signal;
%	 see fft_ua, ifft_ua.
%
%  See Also
%    FWT_YM, IWT_YM, CoarseMeyerProj, DetailMeyerProj, FineMeyerProj
%
 
	if C < 3,
		'C must be >= 3.  Enter new value of C or hit Ctrl-C to break.'
		C = input('C = ?');
	end
% 
	nn = length(w);
	J = log2(nn);
 
%
%  Reconstruct Projection at Coarse Level.
%

	beta = w(1:(2^C));
	cpjf = CoarseMeyerProj(beta, C, nn, deg);
	yhat = cpjf;
 
%
%  Loop to Get Projections at detail levels j=C,...,J-2.
%
	for j = C:(J-2),
		alpha = w(dyad(j));
		dpjf = DetailMeyerProj(alpha,j,(2^J),deg);
		yhat = yhat + dpjf;
	end
 
%
%  Calculate Projection for fine detail level, j=J-1.
%
	alpha = w(dyad(J-1));
	fdpjf = FineMeyerProj(alpha,(J-1),(2^J),deg);
	yhat = yhat + fdpjf;

%
% Invert the transform and take the real part.
%

%	y = nn .* real(ifft(yhat));
	u = FFT2UFT(yhat);

%
%  Based on routine IWT_YM that is 
%  Copyright (c) Eric Kolaczyk, 1994.
%  PWT_YM is Copyright (c) David L. Donoho, 1998.
%

    
    
%   
% Part of WaveLab Version .701
% Built Tuesday, January 30, 1996 8:25:59 PM
% This is Copyrighted Material
% For Copying permissions see COPYING.m
% Comments? e-mail wavelab@playfair.stanford.edu
%   
    
%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%

⌨️ 快捷键说明

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