function dy=t_current_solve(t,y,i_electrode)
%v,n,m,h

g_l=0.05;
e_l=-60;
g_t=1;
e_ca=150;


%  if t>=100 &t<200, i_electrode=i_electrode-5;end

dy = zeros(2,1); 

m_ss=1/(1+exp(-(y(1)+57)/6.2));

h_ss=1/(1+exp((y(1)+81)/4));

if y(1)<-80
    tau_h=exp((y(1)+467)/66.6);
else
    tau_h=28+exp(-(y(1)+22)/10.5);
end

dy(1)=-g_l*(y(1)-e_l) -g_t*m_ss^2*y(2)*(y(1)-e_ca) +i_electrode;

dy(2)=(h_ss-y(2))/tau_h;


    
% y(1)=voltage
%% y(2)=m_ss
%% y(2)=h_ss
% y(2)=h
%% y(5)=tau_m
%% y(4)=tau_h