function xprime = pKsNaModel(t,x)
global E_Na E_K E_Cl R el C Iin eps
xprime=zeros(4,1);
V_C=x(1);A_Na=x(2);A_K=x(3);I_Na=x(4);
%xprime(1)=-(I_Na+K(V_C-E_K)+Cl(V_C-E_Cl)+A_Na-A_K+Iin(t))/C; 
xprime(1)=-(I_Na+K(V_C-E_K)+Cl(V_C-E_Cl)+A_Na-A_K+Iin)/C; 
xprime(2)=el*A_Na*(V_C-R*A_Na);
xprime(3)=el*A_K*(-V_C-R*A_K);
xprime(4)=(V_C-Na(I_Na)-E_Na)/eps;