function dxdt=hhode(t,x)
%HH egyenlet megolása:
n=x(1);
m=x(2);
h=x(3);
V=x(4);

C=1;
Gk=36;
GNa=120;
GL=0.3;
Ek=-72;
ENa=55;
EL=-49.4;

dxdt=zeros(4,1);

dxdt(1) = ((1-n)*alphan(V)) - (n*betan(V));
dxdt(2) = ((1-m)*alpham(V)) - (m*betam(V));
dxdt(3) = ((1-h)*alphah(V)) - (h*betah(V));
dxdt(4) = -(1/C)*(Gk*n^4*(V-Ek)+GNa*m^3*h*(V-ENa)+GL*(V-EL));