11 lines
335 B
Python
11 lines
335 B
Python
import numpy as np
|
|
import num_int_runge_kutta as rk
|
|
|
|
f = lambda ti, ui, phii: -4 * np.sin(phii)
|
|
g = lambda ti, ui, phii: ui
|
|
|
|
funktionswerte = rk.verfahren([f, g], [0, 1, 0], 0.6, 3)
|
|
|
|
for wert in funktionswerte:
|
|
print(f"t = {round(wert[0],1)}s -> phi = {round(wert[2],5)}, phip = {round(wert[1],5)}, v = {round(2.45 * wert[1],5)}")
|