matlab code belongs to the solutions