这个程序是经过修改后的程序,使用的Morlet小波变换的公式为:
其中,fc是小波中心频率,fb是带宽参数。在lz贴的程序中,中心频率为omg0 = WinLen /
6;而在计算时小波函数用的是
Morlet小波变换的函数为:
function [WT, FreqBins, Scales] = CWT_Morlet(Sig, WinLen,
nLevel);
%============================================================%
%
%
%
%
%
%
%
%
%============================================================%
if (nargin == 0),
end;
if (nargin < 4),
elseif (nargin < 3),
elseif (nargin < 2),
end;
Sig = hilbert(real(Sig));
SigLen = length(Sig);
fmax = 0.5;
fmin = 0.005;
fc = 0.5;
omg0 = WinLen / 6;
FreqBins =
logspace(log10(fmin),log10(0.5),nLevel);
Scales = fc*ones(size(FreqBins))./
FreqBins;
WT = zeros(nLevel, SigLen);
wait = waitbar(0,'Under calculation, please wait...');
for m = 1:nLevel,