difference in Matlab and PyWaveletes

84 views
Skip to first unread message

Long WU

unread,
Oct 10, 2021, 1:38:40 AM10/10/21
to PyWavelets
Dear all,
I find there low pass(scaling filter) and high pass(wavelet filter) returned from Matlab and PyWavelets are flipped for both. To illustrate:
++++++++++ Code Begin +++++++++
+++++++++ IN PyWavelets ++++++++++
w = pywt.Wavelet('db10')
(dec_lo, dec_hi, rec_lo, rec_hi)=w.filter_bank
dec_lo: 
[-1.3264202894521244e-05,9.358867032006959e-05,-0.00011646685512928545,-0.0006858566949597116,
0.001992405295185056,0.001395351747052901,-0.010733175483330575,
0.0036065535669561697,0.033212674059341,-0.029457536821875813,
-0.07139414716639708,0.09305736460357235,0.12736934033579325,
-0.19594627437737705,-0.24984642432731538,0.2811723436605775,
0.6884590394536035,0.5272011889317256,0.1881768000776915,
0.026670057900555554]

+++++ In Matlab +++++
sF = dbwavf("db10");
G = sqrt(2)*sF;
H = qmf(G);
% show G:
[0.0266700579009506 0.188176800077620 0.527201188930915 0.688459039452586 0.281172343660424 -0.249846424326486 -0.195946274376595 0.127369340335741 0.0930573646038057 -0.0713941471658601 -0.0294575368219454 0.0332126740589329 0.00360655356698836 -0.0107331754829795 0.00139535174699407 0.00199240529499083 -0.000685856695004676 -0.000116466854994385 9.35886700010889e-05 -1.32642030023547e-05]

++++++++Code End ++++++++++++++

You can see the low pass filter are reversed in Matlab. 
Is this expected?
Reply all
Reply to author
Forward
0 new messages