fix code ampl and matlab