had to made matlab deal with 2d arrays as he seems not able to handle 3d arrays and it worked perfectly :D
ps make window size odd only or inc by 2 as even values will give exceps
retenix needs some fixes (at least in my old ver as i couldnt use ur dll as u're using newer matlab so dependencies doesnt work for me neither would for the dr :p)
make a local branch with ur matlab dependencies and put only working ver in master(that's what i did)
have fun reading this and fixing :D