removed unnecessary loops
optimized d2a
Merge https://github.com/genticuka/MATLAB