Calculate tiered cost and break-even | MathWorks