M1=alpham(V)/(alpham(V)+betam(V)) % Initial m-value So is this correct? Can I keep my way of approaching the problem? This means that documentation suggests a method which is driving a numerical method outside the specified limits. The Dormand Prince Runge Kutta integrator with step size control is designed to operator on differentiable functions. Someone has suggested that it is not correct because the example code in the documentation of ODE45 uses INTERP1 to calculate a parameter in the function to be calculated. However, I am aware that under ODE45 for MATLAB there is a section for time-dependent terms. This code that I'm posting works: I integrate in chunks, as many as I define at the beginning, and depending on the number n of timesteps in which current I changes its value (which is known because the user defines it), I will call ode45 n times, every time using the last values of previous iteration as starting values. I have tried in different ways to see what happens to voltage V and gating conductances m, n and h when, at time step x, current I switched from 0 to 0.1, and then at time step x + n it gets back to 0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |