function dydt = FHN(t,y,a,ai,b,g)
% FitzHugh-Nagumo Equations
tmp1 = y(1)*(a-y(1))*(y(1)-1)-y(2)+ai;
tmp2 = b*y(1)-g*y(2);
dydt = [tmp1; tmp2];

%[t,y] = ode23(@FHN,[0,1000],[0.1,0],[],0.25,0.15,0.002,0.002);