📄 separatecoeff.sci
字号:
function [rtrigcoefs, itrigcoefs] = SeparateCoeff(wcoefs,windows)
// SeparateCoeff -- Separate wavelet coeff. into local trig. coeff.
// Usage
// [rtrigcoefs, itrigcoefs] = SeparateCoeff(wcoefs,windows)
// Inputs
// wcoefs wavelet coefficients for a given level.
// windows string selecting window for projection.
// 'm' -> mother, 'f' -> father, 't' -> truncated mother
// Outputs
// rtrigcoefs trigonometric coefficients corresponding to
// projection of real part of \hat f
// itrigcoefs trigonometric coefficients corresponding to
// projection of imag part of \hat f
// See Also
// CoarseMeyerProj, DetailMeyerProj, FineMeyerProj
//
// Copyright Aldo I Maalouf
nj = length2(wcoefs);
nj1 = nj/2;
if windows == 'm',
rtrigcoefs = (-1).^(1:(nj1)).*(waverow(wcoefs(1:nj1)) + waverow(wcoefs(nj:-1:(nj-nj1+1)))) ./ 2 ;
itrigcoefs = (-1).^(1:(nj1)).*(waverow(wcoefs(1:nj1)) - waverow(wcoefs(nj:-1:(nj-nj1+1)))) ./ 2 ;
elseif windows == 'f',
rtrigcoefs = (-1).^(1:nj-1) .* [ waverow(wcoefs(2:nj)) + waverow(wcoefs(nj:-1:2)) ] / sqrt(2) ;
rtrigcoefs = [ 2*wcoefs(1) rtrigcoefs ];
itrigcoefs = (-1).^(2:nj) .* [ waverow(wcoefs(2:nj)) - waverow(wcoefs(nj:-1:2)) ] / sqrt(2) ;
elseif windows == 't',
rtrigcoefs = (-1).^(1:nj1).*(waverow(wcoefs(1:nj1)) + waverow(wcoefs(nj:-1:(nj-nj1+1)))) ./ 2 ;
itrigcoefs = (-1).^(1:nj1).*(waverow(wcoefs(1:nj1)) - waverow(wcoefs(nj:-1:(nj-nj1+1)))) ./ 2 ;
else
'windows given was not m, f, or t !'
end
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -