here is an example that define the differential equation with a condition on a variable:
consider ternary operator in python:
min = a if a < b else b
dc_Ca/dt= 'some code as a function of membrain potentail' :1 tau_m = 76*ms-72*ms*c_Ca/5 if(c_Ca < 5) else 4*ms :second
c_Ca is variable that update with membrane potential,
tau_m is also update with
is it possible to define it in the Brian?
I look for a while in the documentation to find an example for this, but I did not find anything.
Thank you for any guide.
I think we can use this:
tau_m = (76*ms-72*ms*c_Ca/5) * (c_Ca < 5) + 4*ms * (c_Ca >= 5) :second