Skip to content

Instantly share code, notes, and snippets.

@moorepants
Created July 7, 2015 16:29
Show Gist options
  • Select an option

  • Save moorepants/09502a19a8f9c5c94df3 to your computer and use it in GitHub Desktop.

Select an option

Save moorepants/09502a19a8f9c5c94df3 to your computer and use it in GitHub Desktop.
Jacobian of systems
from pydy.models import n_link_pendulum_on_cart
sys = n_link_pendulum_on_cart(2)
sys.coordinates
sys.eom_method.q
sys.eom_method.u
sys.states
import sympy as sm
x = sm.Matrix(sys.states)
x
sys.eom_method.forcing
sys.eom_method.forcing.shape
sys.eom_method.forcing.jacobian(x)
sys = n_link_pendulum_on_cart(10)
x = sm.Matrix(sys.states)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment