except for borders, the matlab wavelet and c++ perform the same operations now