[SciPy-user] integrate.odeint and simultaniuos equations
Tue Jan 20 23:00:18 CST 2009
I added an example with two degrees of freedom to the SciPy wiki, in this
A system with two degrees of freedom (and no constraints) will result in a
four dimensional state space; you will have a system of four first order
differential equations. This is what Bastian Weber pointed out at the end
of his response to your first email about this.
On Tue, Jan 20, 2009 at 6:34 AM, Scott Askey <firstname.lastname@example.org> wrote:
> Do ode and odeint work in multiple dimensions?
> I could not any examples with more than one degree of freedom. And from
> the doc string it how to solve simultaneous ode's was not obvious. The
> code for modelling a 2d simple harmonic oscillator or spherical pendulum
> would give me the insight I need.
> I found and understand the following 1 D harmonic oscillator model from the
> scipy cookbook.
> from scipy import *
> from pylab import *
> deriv = lambda y,t : array([y,-y-.1*y])#xdot,x2dot
> # Integration parameters
> from scipy import integrate
> y0=array([0.0005,0.2]) #x,x_dot
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user