Bounding output value from ode113
이전 댓글 표시
Hi,
I have a question about ODE (namely ode113). I try to model ADEX neuron, but in the model (described below) output variable should be bounded so that if it reaches threshold then we should reset it to some value. During research I found an article in which researchers used ode113 but I am struggling to get it working. Do you have any ideas if it is possible to do that with built-in function or should I write my own ode113 method for that purpose?
Adex model:
dV/dt = (-gl * (V - El) + gl * DeltaT * exp((V - Vt) / DeltaT) - w + I) / C;
dw/dt = (a * (V - El) - w) / tw;
if V >= threshold -> V = Vreset
답변 (1개)
Steven Lord
2017년 2월 15일
0 개 추천
Use an events function to stop the solver's progress when V reaches your threshold. Use the state returned by the first call to the solver to generate the initial conditions for another call to the solver that starts at the point you stopped the first call.
See the ballode demo for an example that uses ode23 to do this, stopping when the ball's height above the ground reaches 0. You should be able to adapt that to your ODEs and your ode113 call.
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!