## Izhikevich model driver for Octave Izhikevich03_defs = "Izhikevich03_solver.m"; autoload ("RS", Izhikevich03_defs ); autoload ("RS_event", Izhikevich03_defs ); autoload ("RS_initial", Izhikevich03_defs ); autoload ("IB", Izhikevich03_defs ); autoload ("IB_initial", Izhikevich03_defs ); autoload ("CH", Izhikevich03_defs ); autoload ("CH_initial", Izhikevich03_defs ); autoload ("FS", Izhikevich03_defs ); autoload ("FS_initial", Izhikevich03_defs ); autoload ("LTS", Izhikevich03_defs ); autoload ("LTS_initial", Izhikevich03_defs ); RS_initial; t0 = 0.0; t1 = 500.0; global RS_state RS_state = RS_initial RS_ys = [[RS_state.t,RS_state.U,RS_state.V,RS_state.spike]]; tic; while (RS_state.t < t1) y = RS(RS_state); if (y.spike) RS_state.h = 1e-3; y = RS(RS_state); else if (RS_state.h < 0.25) RS_state.h = RS_state.h+1e-1; endif endif RS_state.t = y.t; RS_state.U = y.U; RS_state.V = y.V; RS_state.spike = y.spike; RS_state.tspike = y.tspike; RS_ys = [RS_ys; [y.t,y.U,y.V,RS_state.spike]]; endwhile toc; # IB_state = IB_initial; # IB_ys = [[IB_state.t,IB_state.V]]; # while (IB_state.t < t1) # y = IB(IB_state); # IB_state.t = y.t; # IB_state.U = y.U; # IB_state.V = y.V; # IB_state.spike = y.spike; # IB_state.tspike = y.tspike; # IB_ys = [IB_ys; [y.t,y.V]]; # endwhile # CH_state = CH_initial; # CH_ys = [[CH_state.t,CH_state.V]]; # while (CH_state.t < t1) # y = CH(CH_state); # CH_state.t = y.t; # CH_state.U = y.U; # CH_state.V = y.V; # CH_state.spike = y.spike; # CH_state.tspike = y.tspike; # CH_ys = [CH_ys; [y.t,y.V]]; # endwhile # FS_state = FS_initial; # FS_ys = [[FS_state.t,FS_state.V]]; # while (FS_state.t < t1) # y = FS(FS_state); # FS_state.t = y.t; # FS_state.U = y.U; # FS_state.V = y.V; # FS_state.spike = y.spike; # FS_state.tspike = y.tspike; # FS_ys = [FS_ys; [y.t,y.V]]; # endwhile # LTS_state = LTS_initial; # LTS_ys = [[LTS_state.t,LTS_state.V]]; # while (LTS_state.t < t1) # y = LTS(LTS_state); # LTS_state.t = y.t; # LTS_state.U = y.U; # LTS_state.V = y.V; # LTS_state.spike = y.spike; # LTS_state.tspike = y.tspike; # LTS_ys = [LTS_ys; [y.t,y.V]]; # endwhile