MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / compute_ABCD

Function compute_ABCD

code/optim/bridge_de.py:38–50  ·  view source on GitHub ↗
(bounds, t, y_meas)

Source from the content-addressed store, hash-verified

36 Fn, t, Y = data
37 return np.linalg.norm(Fn(t,A,B,C,D)-Y)
38def compute_ABCD(bounds, t, y_meas):
39 args = (Fn, t, y_meas)
40 DE_result = differential_evolution(func, bounds, args=args)
41 soln = { 'success' : DE_result.success,
42 'message' : DE_result.message,
43 'x' : DE_result.x,
44 }
45 if DE_result.success:
46 y_DE_fit = Fn(t, *DE_result.x)
47 else:
48 y_DE_fit = []
49 soln['y_fit'] = y_DE_fit
50 return soln

Callers

nothing calls this directly

Calls 1

FnFunction · 0.70

Tested by

no test coverage detected