Info
This question is closed. Reopen it to edit or answer.
Help regarding Poissonian process in ode solver
1 view (last 30 days)
Show older comments
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.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!