Skip to content

Instantly share code, notes, and snippets.

@smichr
Created December 24, 2021 19:03
Show Gist options
  • Save smichr/01b28d8a7506595305814cc8599e35c2 to your computer and use it in GitHub Desktop.
Save smichr/01b28d8a7506595305814cc8599e35c2 to your computer and use it in GitHub Desktop.
debug
Size = 2
k = 3
xstartswitchpoint = Matrix([[5.], [5.]]) # y,Vy
Aklinnonlin = Matrix([[k,1],[0,-0.5]])
b2x2 = Matrix([[5.], [-3.]])
dydx = zeros(Size,1)
dydx
def dxdt_y(Aklinnonlin, xstartswitchpoint, b2x2):
dydx[0,0] += xstartswitchpoint[1,0]
dydx[1,0] += -1 * Aklinnonlin[0,0] * (xstartswitchpoint[1,0]) - 9.81
return dydx
dydx[0,0] += xstartswitchpoint[1,0]
dydx
dydx[0,0] += sum( [ dydx[0,0],xstartswitchpoint[1,0] ] ) # put args in list
dydx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment