A MATLAB implementation of upwind finite differences and adaptive grids in the method of lines