Skip to content

Commit

Permalink
sym -> sm
Browse files Browse the repository at this point in the history
  • Loading branch information
moorepants committed Aug 3, 2024
1 parent e6b8ef2 commit 5cfebea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples-gallery/plot_vyasarayani.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
"""

import numpy as np
import sympy as sym
import sympy as sm
from scipy.integrate import odeint
import matplotlib.pyplot as plt
from opty import Problem

# %%
# Specify the symbolic equations of motion.
p, t = sym.symbols('p, t')
y1, y2 = [f(t) for f in sym.symbols('y1, y2', cls=sym.Function)]
y = sym.Matrix([y1, y2])
f = sym.Matrix([y2, -p*sym.sin(y1)])
p, t = sm.symbols('p, t')
y1, y2 = [f(t) for f in sm.symbols('y1, y2', cls=sm.Function)]
y = sm.Matrix([y1, y2])
f = sm.Matrix([y2, -p*sm.sin(y1)])
eom = y.diff(t) - f
sym.pprint(eom)
sm.pprint(eom)

# %%
# Generate some data by integrating the equations of motion.
Expand Down

0 comments on commit 5cfebea

Please sign in to comment.