Python Model Fit Function Matlab Code For Bisection