Reset during a simulation

瀏覽次數:0 次
跳到第一則未讀訊息

Wei, Jingjin

未讀,
2019年6月11日 中午12:14:132019/6/11
收件者:DynaSim Users
Hi all,

Is there a way to reinitialize, or reset the voltage of all cells every T while the total run time is Ttot. T< Ttot. Thanks!

Best,
Jingjin

Jason Sherfey

未讀,
2019年6月11日 下午5:37:002019/6/11
收件者:Wei, Jingjin、DynaSim Users
Hi Jingjin,

Here's one way to do it. This should work equally well for a population of cells.

Ttot=100; % ms, duration of simulation

eqns = {
  'dV/dt=@current+10; {iNa,iK}' % neuronal dynamics
  'V_IC=-100*ones(1,Npop)' % voltage reset value
  'T=20' % ms, period between resets
  'V(0)=V_IC' % initialize the voltage
  'if(mod(t,T)<dt*ones(1,Npop))(V=V_IC)' % reset V for entire population every T [ms]
  };

data = dsSimulate(eqns,'time_limits',[0 Ttot]);
dsPlot(data);

Hope this helps.

Cheers,
Jason


--
You received this message because you are subscribed to the Google Groups "DynaSim Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynasim-user...@googlegroups.com.
To post to this group, send email to dynasi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynasim-users/BN7PR03MB3633321A4894B815940A00CFA7ED0%40BN7PR03MB3633.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
回覆所有人
回覆作者
轉寄
0 則新訊息