matlab code to generate problems/simulate Sam's Hauling