New formulation using matlab