Initial addition of matlab code