Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #v0=state[1]
- #a=-k*state[0]
- #g1=state[1]
- #g2=(L0+state[0])*state[3]*state[3]-(k/m)*state[0]+g*cos(state[2])
- #g3=state[3]
- #g4=-1/(state[0]+L0)*g*sin(state[2])+2*state[1]*state[3]
- rdot = state[0] #Vr
- phidot = state[1] #Vphi
- vrdot = ((-state[2] * g) - (state[3] * r * sqrt(phidot)))/(state[3] + state[2])
- vphidot = (2*rdot * phidot)/r
- return array([rdot,phidot,vrdot,vphidot])
Add Comment
Please, Sign In to add comment