setting variables from within NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg73103] setting variables from within NDSolve
- From: "dantimatter" <dantimatter at gmail.com>
- Date: Fri, 2 Feb 2007 05:39:44 -0500 (EST)
hello all, i have an equation that i'm trying to incorporate into NDSolve. it's a piecewise function: D[foo[t], t] == Piecewise[{{slope, foo[t] < max && (foo[t] > min || bar[t] < threshold)}}, -foo[t-t0]] the problem is that i want to set t0 at the time that the condition changes from true to false. is there a way that i can set this variable from within NDSolve on the condition change only, and not while the system remains in the true or false state? thanks, dan