You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if I am missing something very basic (I am only just learning about wavelets), but I believe there is a bug in dwt:
n = 2^6 - 1
u = cos.(2*pi*range(0, stop=1, length=n))
wav = wavelet(WT.haar) # also tested WT.db2
w = dwt(u, wav)
display(w == u)
This code returns true. Expected behaviour is that w is the discrete wavelet transform of u, something like I get running the same experiment in Mathematica.
Version info:
Wavelets 0.9.4
Julia 1.6.3
The text was updated successfully, but these errors were encountered:
I can confirm seeing the same with Julia 1.7.3.
Changing the first line to n = 2^6 leads to output that makes more sense (I didn't check the values).
Typing ]?dwt might help you see the issue.
The default value of L (# of transform levels) is maxtransformlevels(x) which is 0 for your signal because its length has no factors of 2.
It is not a bug, but rather a limitation (or design choice) of the implementation here.
The same example in Matlab returns two vectors of length 32, meaning that it must be padding somehow, according to the dtwmode setting apparently.
You should decide what kind of padding you want. See related issue #80.
Apologies if I am missing something very basic (I am only just learning about wavelets), but I believe there is a bug in
dwt
:This code returns
true
. Expected behaviour is thatw
is the discrete wavelet transform ofu
, something like I get running the same experiment in Mathematica.Version info:
Wavelets 0.9.4
Julia 1.6.3
The text was updated successfully, but these errors were encountered: