Added Licence and Matlab code