Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: MATLAB: Is it possible to have two event values whilst using ode45?
Date: Fri, 7 Dec 2012 01:23:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 4
Message-ID: <k9rgdt$j2c$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1354843389 19532 172.30.248.48 (7 Dec 2012 01:23:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 7 Dec 2012 01:23:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3903163
Xref: news.mathworks.com comp.soft-sys.matlab:784357

I want two limitations to my ode45 calculation of a movement equation: position and time. I have already got the time event to work but I am not sure if and how I can add another event for limiting the position. 
I also have many different particles coupled together in one ODE equation and need them to stop individually once they reach a 'roof' as they all travel at different speeds... would I be able to achieve this through events? I have an idea on how I would do this but its very complicated and would probably be very slow...

Any help would be greatly appreciated!