mm_rwt.sci
来自「小波分解源代码」· SCI 代码 · 共 39 行
SCI
39 行
function maxmap = MM_RWT(rwt,par)
// MM_RWT -- Modulus Maxima of a Real Wavelet Transform
// Usage
// maxmap = MM_RWT(rwt,par)
// Inputs
// rwt Output of RWT
// par optional. If present, keep thresholds only
// above a certain value. default = 1000
// Outputs
// maxmap binary array indicating presence of max or not
//
// Description
// Used to calculate fractal exponents etc.
//
// Copyright Aldo I Maalouf
[lhs,rhs]=argn();
if rhs<2,
par = 1000;
end
sz = size(rwt);
nscale = sz(2);
n = sz(1);
maxmap = zeros(sz);
t = 1:n;
tplus = rshift(t);
tminus = lshift(t);
rwt = abs(rwt);
for k=1:nscale,
localmax = rwt(t,k) > rwt(tplus,k) & rwt(t,k) > rwt(tminus,k) ;
y = localmax(t) .* rwt(:,k);
maxy = max(y);
maxmap(t,k) = (y >= maxy/par);
end
endfunction
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?