Added Some matlab code to GM