Matlab implementation of "Flow Interception Location and Design" problem