Code covered by the BSD License  

Highlights from
database figure chao heart N°3 for students

image thumbnail

database figure chao heart N°3 for students

by

 

database figure chao N°3 for students

v=pacemaker1VINAIK
function v=pacemaker1VINAIK
%PROGRAM INTEGRATION MODEL PACEMAKER VI1 FOR ALL THE CARDIAC CELLS runge
%kutta 4 matlab R2007a
%dV/dt=(a/c)V^^^3 +(b/C)V^^2 +(do/C)V +d1/C -I1/C +Io/C
%dI1/dt=V/L -(R/L)I1 +E/L
%cardiac parameters 
 a=-0.3;b=15e-3;do=0.65;d1=0.008;Ena=90e-3;Lna=300e-3;Cna=9600e-6;Rna=0.2;
D=5;N=1000;h=D/N;w=20;Rk=0.2;Lk=300e-3;C=9600e-6;Ek=90e-3;w=6;
%intial conditions
V(1)=-0.05;Ina(1)=-0.0096;Ik(1)=-0.0096;
for n = 1: 1: 1000
    A1(n) = (a/C)*(V(n)).^3+(b/C)*(V(n)).^2+(do/C)*V(n)+d1/C-(1/C)*(Ina(n)+Ik(n))+0.9*(1/C)*sin(w*n*h);
    B1(n) = (1/Lna)*V(n)-(Rna/Lna)*Ina(n)+Ena/Lna;
    C1(n) = (1/Lk)*V(n)-(Rk/Lk)*Ik(n)-Ek/Lk; 
    A2(n) = (a/C)*(V(n)+(h/2)*A1(n)).^3+(b/C)*(V(n)+(h/2)*A1(n)).^2+(do/C)*(V(n)+(h/2)*A1(n))+d1/C-(1/C)*(Ina(n)+Ik(n)+(h/2)*(B1(n)+C1(n)))+(1/C)*0.9*sin(w*n*h);
    B2(n) = (1/Lna)*(V(n)+(h/2)*A1(n))-(Rna/Lna)*(Ina(n)+(h/2)*B1(n))+Ena/Lna;
    C2(n)=   (1/Lk)*(V(n)+(h/2)*A1(n))-(Rk/Lk)*(Ik(n)+(h/2)*C1(n))-Ek/Lk;
    A3(n) = (a/C)*(V(n)+(h/2)*A2(n)).^3+(b/C)*(V(n)+(h/2)*A2(n)).^2+(do/C)*(V(n)+(h/2)*A2(n))-d1/C-(1/C)*(Ina(n)+Ik(n)+(h/2)*(B2(n)+C2(n)))+(1/C)*0.9*sin(w*h*n);
    B3(n) = (1/Lna)*(V(n)+(h/2)*A2(n))-(Rna/Lna)*(Ina(n)+(h/2)*B2(n))+Ena/Lna;
    C3(n) = (1/Lk)*(V(n)+(h/2)*A2(n))-(Rk/Lk)*(Ik(n)+(h/2)*C2(n))-Ek/Lk;
    A4(n) = (a/C)*(V(n)+(h/2)*A3(n)).^3+(b/C)*(V(n)+(h/2)*A3(n)).^2+(do/C)*(V(n)+(h/2)*A3(n))+d1/C-(1/C)*(Ina(n)+Ik(n)+(h/2)*(B3(n)+C3(n)))+(1/C)*0.9*sin(w*n*h);
    B4(n) = (1/Lna)*(V(n)+h*A3(n))-(Rna/Lna)*(Ina(n)+h*B3(n))+Ena/Lna;
    C4(n) = (1/Lk)*(V(n)+(h/2)*A3(n))-(Rk/Lk)*(Ik(n)+(h/2)*C3(n))-Ek/Lk;
    V(n+1) = V(n)+(h/6)*(A1(n)+A2(n)+2*A3(n)+A4(n));
    Ina(n+1) = Ina(n)+(h/6)*(B1(n)+B2(n)+2*B3(n)+B4(n));
    Ik(n+1) = Ik(n)+(h/6)*(C1(n)+C2(n)+2*C3(n)+C4(n));  
end        
plot3(V,Ina,Ik)
title(['a= ', num2str(a),' b= ', num2str(b),' do= ', num2str(do),' d1= ', num2str(d1),' E= ', num2str(E),' R= ', num2str(R),' L= ', num2str(L),' C= ', num2str(C)])
end


    

Contact us