Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Vector of random initial values
- g0=[np.random.uniform(low=0,high=1) for val in range(4)]
- #Minimization of the squared error by Nelder-Mead
- res = minimize(SquaredError, g0, method='nelder-mead',options={'xtol': 1e-3, 'maxiter':100,'disp': False})
- ModelParams03=curve_fit(ModelFit,SolverTime,WhiteSignal,p0=res.x)
- FitSolution3=ModelSolver(SolverTime,ModelParams03[0][0],ModelParams03[0][1],ModelParams03[0][2],ModelParams03[0][3],Int)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement