have code working on pebble for wavelet, need to confirm in matlab