From: Ivan Goremiko on
I am trying to implement db4 DWT with periodazed wavelets.
However,my results is slightly different what matlab does.
As I noticed my code works fine for one-level decomposition,but
and higher level I've got details coefficients different from matlab code.
Approximation coefficients are calculating fine.
My algorithm in general:

read signal

apply circular convolution to low pass filter
apply circular convolution to high pass filter
shift last element to first (??)I have no idea why it is needed in Matlab
signal = details coefficients
repeat --.

Can everyone tell me what is wrong with this approach and what matlab doing with
dwtmode set to ''per'?