function out = MorrisLecarModel out{1} = @init; out{2} = @fun_eval; out{3} = []; % @jacobian; out{4} = []; out{5} = []; out{6} = []; out{7} = []; out{8} = []; out{9} = []; % -------------------------------------------------------------------------- function dydt = fun_eval(t,x,Inp,V3) Minf=(1+tanh((x(1)+1.2)/18))/2; Ninf=(1+tanh((x(1)-V3)/17.4))/2; tau=1/15*cosh((x(1)-V3)/34.8); dydt=[1/5*(Inp-2*(x(1)+60)-4*Minf*(x(1)-120)-8*x(2)*(x(1)+80)); tau*(Ninf-x(2));]; % -------------------------------------------------------------------------- function [tspan,y0] = init handles = feval(MorrisLecarModel); % -------------------------------------------------------------------------- function jac = jacobian(t,x,Inp,V3) jac=[[-4/5-1/5*(1/9-1/9*tanh(1/18*x(1)+1/15)^2)*(x(1)-120)-2/5*tanh(1/18*x(1)+1/15)-8/5*x(2), ... -8/5*x(1)-128]; ... [1/522*sinh(5/174*x(1)-5/174*V3)*(1/2+1/2*tanh(5/87*x(1)-5/87*V3)-x(2))+1/15*cosh(5/174*x(1)-5/174*V3)*(5/174-5/174*tanh(5/87*x(1)-5/87*V3)^2), ... -1/15*cosh(5/174*x(1)-5/174*V3)]];