Code covered by the BSD License  

Highlights from
Image 3D chao of heart for students

image thumbnail

Image 3D chao of heart for students

by

Dit Papa Lamine ndao

 

database image 3D chao heart

v=pacemaker1VI1
function v=pacemaker1VI1
%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;E=90e-3;L=300e-3;C=9600e-6;R=0.2;
D=2.4;N=1000;h=D/N;w=20;
%intial conditions
V(1)=-0.05;I1(1)=-0.0096;
m=1;
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)*I1(n)+(1/C)*Io;
    B1(n) = (1/L)*V(n)-(R/L)*I1(n)+E/L;
    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)*(I1(n)+(h/2)*B1(n))+(1/C)*Io;
    B2(n) = (1/L)*(V(n)+(h/2)*A1(n))-(R/L)*(I1(n)+(h/2)*B1(n))+E/L;
    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)*(I1(n)+(h/2)*B2(n))+(1/C)*Io;
    B3(n) = (1/L)*(V(n)+(h/2)*A2(n))-(R/L)*(I1(n)+(h/2)*B2(n))+E/L;
    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)*(I1(n)+(h/2)*B3(n))+(1/C)*Io;
    B4(n) = (1/L)*(V(n)+h*A3(n))-(R/L)*(I1(n)+h*B3(n))+E/L;
    V(n+1) = V(n)+(h/6)*(A1(n)+A2(n)+2*A3(n)+A4(n));
    I1(n+1) = I1(n)+(h/6)*(B1(n)+B2(n)+2*B3(n)+B4(n));
end        
plot(V)
hold on
plot(I1)
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