Overload matlab functions to provide derivatives.