Info

This question is closed. Reopen it to edit or answer.

Help regarding Poissonian process in ode solver

1 view (last 30 days)
Gadi
Gadi on 14 Sep 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello,
I am trying to write a simulation using the ode solver (to which I'm rather new).
The simulation includes solving the Langevin equations for a particle in one of two potentials. I would like to alternate between the potentials in which the particle moves during the simulation using a Poissonian process, i.e, I want to solve:
xdot = p;
pdot = U(x) + sqrt(2*D)*randn;
where U(x) is determined by checking whether some random number R is less than some rate Gamma times Delta t . To make things more complicated, I need Gamma to be a function of x too.
My basic problem is that I'm not sure where and how to write my condition inside the ode function.
I hope the question is clear enough. If not I'd be happy to elaborate. Thanks!
Gadi.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!