function out = MyODEFunc out{1} = @init; out{2} = @fun_eval; out{3} = []; %@jacobian; out{4} = []; %@jacobianp; out{5} = []; %@hessians; out{6} = []; %@hessiansp; out{7} = []; out{8} = []; out{9} = []; % -------------------------------------------------------------------------- function dydt = fun_eval(t,kmrgd,Inp,V3) Minf=(1+tanh((kmrgd(1)+1.2)/18))/2; Ninf=(1+tanh((kmrgd(1)-V3)/17.4))/2; tau=1/15*cosh((kmrgd(1)-V3)/34.8); dydt=[1/5*(Inp-2*(kmrgd(1)+60)-4*Minf*(kmrgd(1)-120)-8*kmrgd(2)*(kmrgd(1)+80)); tau*(Ninf-kmrgd(2));]; % -------------------------------------------------------------------------- function [tspan,y0,options] = init handles = feval(MyODEFunc); y0=[0,0]; options = odeset('Jacobian',handles(3)); tspan = [0 10];