Several methods of how to calculate zero of a function with Matlab