Added a controller for diff between matlab and c++