Adding Matlab code