function dnei= nda_neuronal(t,dt, input, nei,n0,T_e,T_i,ce,ci,ceu,ciu)

tindex=round(t/dt+1,0);

% if nei(1) < n0
%     nei(1) = n0;
% end
% if nei(2) < n0
%     nei(2) = n0;
% end
% if nei(3) < n0
%     nei(3) = n0;
% end
% if nei(4) < n0
%     nei(4) = n0;
% end

dnei=[0;0;0;0];

dnei(1) = (1 - nei(1) -  ci(1)*(nei(2)-1) + ceu(1)*input(tindex))/T_e(1);
dnei(2) = (1 - nei(2) +  ce(1)*(nei(1)-1) + ciu(1)*input(tindex))/T_i(1);

dnei(3) = (1 - nei(3) -  ci(2)*(nei(4)-1) + ceu(2)*(nei(1)-1))/T_e(2);
dnei(4) = (1 - nei(4) +  ce(2)*(nei(3)-1) + ciu(2)*(nei(1)-1))/T_i(2);


end