我有一个一阶 ODE 系统:f(x) = x_i ** 2 - x_i适用于所有人i(我现在正在研究 3 个维度)。
这就是我定义它的方式:
lower, upper = -10, 10
def xdot(__xs, t):
return [__xs[i] ** 2 - __xs[i] for i in range(len(__xs))]
x0 = [1.2, 1.2, 1.2]
t = np.linspace(lower, upper, upper - lower)
res = integrate.odeint(xdot, x0, t)
这是使用 odeint 的正确方法吗?我得到:
ODEintWarning: Excess work done on this call