def funk(m,t):
return [m[0], -m[0]+m[1]*np.sin(t)]
zac_pogoji = [15, 10, 13]
h = 0.1
solver = ode(funk).set_initial_value(zac_pogoji)
zac = [zac_pogoji]
sprem = [0]
while solver.t < 5:
solver.integrate(solver.t + h)
zac.append(solver.y)
sprem.append(solver.t)
TypeError: 'float' object is not subscriptable
我试图用数值求解微分方程:z(y)* sin(y)= z&#39;&#39;(y)+ z&#39;(y)以某种方式我无法解决它。我应该使用其他方法解决3阶diff.eq?