Neuro project

%Author: minster
clear all
close all
dt=50;
Ek=-72.1;
Ena=52.400;
Ecl=-49.187;
gbark=36;
gbarna=120;
gcl=0.3;
n=0.31768;
m=0.05293;
h=0.59612;
Cm=1;
Temp=6.3;
gk=0.367;
gna= 0.011;
vm(1)=-60;
Vr=-60;
gk=gbark*n^4;
gna=gbarna*m^3*h;
%Im=Ic+Ina+Ik+Icl;
for j=-200:1:0;
vm=-60;
Ic=0;
plot(j, Ic, ‘b-‘)
plot(j, vm, ‘r-‘)
hold all
end
for i=1:1:150,
gk=gbark*n^4;
gna=gbarna*m^3*h;
dvm = 0.2;
vm=(gk*Ek+gna*Ena+gcl*Ecl)/(gk+gna+gcl)+dvm*i;
Ic(i)=Cm*dvm/dt;
Ik=gk*(dvm-Ek);
Ina=gna*(dvm-Ena);
Icl=gcl*(dvm-Ecl);
Im=Ic(i)+Ina+Ik+Icl+200;
plot(i, Im, ‘b-‘)
hold all
plot(i, vm, ‘r-‘)
end
for k=151:1:300,
vm=(gk*Ek+gna*Ena+gcl*Ecl)/(gk+gna+gcl)+0.2*150-0.2*(k-150);
Is=0;
plot(k, Ic, ‘b-‘)
plot(k, vm, ‘r-‘)
hold all
end
for z=301:1:325,
vm=(gk*Ek+gna*Ena+gcl*Ecl)/(gk+gna+gcl)-0.2*(z-300);
Is=0;
plot(z, Ic, ‘b-‘)
plot(z, vm, ‘r-‘)
hold all
end
for h=326:1:350,
vm=(gk*Ek+gna*Ena+gcl*Ecl)/(gk+gna+gcl)-0.2*25+0.2*(h-325);
Is=0;
plot(h, Ic, ‘b-‘)
plot(h, vm, ‘r-‘)
hold all
end
for ii=350:1:1000,
vm=-60;
Is=0;
plot(ii, Ic, ‘b-‘)
plot(ii, vm, ‘r-‘)
hold all
end