Python Model Fit Function In Matlab