Update 2

Some fixes to Matlab code.

Added Julia implementation