From: Jake Mitchell on
I am trying to integrate a system using ode45 in which the spring rate changes with system deflection. Is there a way to use ode45 for this? I would need to check the preious iteration and see if the deflection (x) has reached a certain point. If it has, then a new spring stiffness is used. Is there a way to check for this within ode45?
From: Star Strider on
"Jake Mitchell" <aubeng2010(a)yahoo.com> wrote in message <hn0is1$gbi$1(a)fred.mathworks.com>...
> I am trying to integrate a system using ode45 in which the spring rate changes with system deflection. Is there a way to use ode45 for this? I would need to check the preious iteration and see if the deflection (x) has reached a certain point. If it has, then a new spring stiffness is used. Is there a way to check for this within ode45?



Please post your code! We're good here, but we're not clairvoyant.