From: Roman Tolmachev on
Hello everyone,
I'll be very thankful if someboby helps me: I need to solve a system of two differential equations, quite complicated and face that ode45 spends hours and cannot solve it. I tried ode113 for 6 hours, cpu was loaded on 100%, but no result. Is it ok for solvers to work so long? And since I have not got result, what solver would you recommend?
My code:

function bifur(p1)
global I;
I=p1*10^(-3);
[T,Y]=ode45(@diffnv,[0 1],[10 0.1]);
plot(Y(:,1));

function dy=diffnv(t,y)
global I gCa gK gL VCa VK VL V1 V2 V3 V4 C;
gCa=4.4; gK=8; gL=2;
VCa=120; VK=-84; VL=-60;
V1=-1.2; V2=18; V3=2; V4=30;
C=20*10^(-3);
dy=zeros(2,1);
dy(1)=(I-gCa*0.5*(1+tanh((y(1)-V1)/V2))*(y(1)-VCa)+gL*(y(1)-VL)+gK*y(2)*(y(1)-VK))/C;
dy(2)=(0.5*(1+tanh((y(1)-V3)/V3))-y(2))/(25/cosh((y(1)-V3)/(2*V4)));
From: Torsten Hennig on
> Hello everyone,
> I'll be very thankful if someboby helps me: I need to
> solve a system of two differential equations, quite
> complicated and face that ode45 spends hours and
> cannot solve it. I tried ode113 for 6 hours, cpu was
> loaded on 100%, but no result. Is it ok for solvers
> to work so long? And since I have not got result,
> what solver would you recommend?
> My code:
>
> function bifur(p1)
> global I;
> I=p1*10^(-3);
> [T,Y]=ode45(@diffnv,[0 1],[10 0.1]);
> plot(Y(:,1));
>
> function dy=diffnv(t,y)
> global I gCa gK gL VCa VK VL V1 V2 V3 V4 C;
> gCa=4.4; gK=8; gL=2;
> VCa=120; VK=-84; VL=-60;
> V1=-1.2; V2=18; V3=2; V4=30;
> C=20*10^(-3);
> dy=zeros(2,1);
> dy(1)=(I-gCa*0.5*(1+tanh((y(1)-V1)/V2))*(y(1)-VCa)+gL*
> (y(1)-VL)+gK*y(2)*(y(1)-VK))/C;
> dy(2)=(0.5*(1+tanh((y(1)-V3)/V3))-y(2))/(25/cosh((y(1)
> -V3)/(2*V4)));

What is a typical value for p1 ?

Best wishes
Torsten.
From: Roman Tolmachev on

> What is a typical value for p1 ?
>
> Best wishes
> Torsten.

Thanks for reply, from 0 to 300