Cell behavior driven by "if" statements
Posted: Sat Jul 04, 2015 8:23 pm
I created 3 neurons (Neuron_1, Neuron_2 and Neuron_3).
When Neuron_1 is stimulated with an IClamp, Neuron_1 depolarizes Neuron_2.
When Neuron_3 is stimulated with an IClamp, Neuron_3 also depolarizes Neuron_2.
I am trying to create the following conditional statement:
If Neuron_1 fires at Neuron_2, Neuron_2 fires back to Neuron_1.
If Neuron_3 fires at Neuron_2, Neuron_2 fires back to Neuron_3.
I created the following “if” statement:
I used soma.v > 0 as my logical expression because if that soma is stimulated with an IClamp, the -65mV should depolarize to a value > 0, which will make that expression "true" and thus execute the appropriate statement. The problem I am noticing is that “if” statements seem to only work while the simulation IS NOT running. My statements rely on the voltage change that only occurs while the simulation IS running. How can I get the program to execute the “if” statements while the simulation is running?
When Neuron_1 is stimulated with an IClamp, Neuron_1 depolarizes Neuron_2.
When Neuron_3 is stimulated with an IClamp, Neuron_3 also depolarizes Neuron_2.
I am trying to create the following conditional statement:
If Neuron_1 fires at Neuron_2, Neuron_2 fires back to Neuron_1.
If Neuron_3 fires at Neuron_2, Neuron_2 fires back to Neuron_3.
I created the following “if” statement:
Code: Select all
Access Neuron_2_axon
if(Neuron_1_soma.v > 0) {
nclist.append(new NetCon (&v(1), syn1, -20, 1, 1)) // syn1 belongs to the dendrite of Neuron_1
}
if(Neuron_3_soma.v > 0) {
nclist.append)new NetCon (&v(1), syn3, -20, 1, 1)) // syn3 belongs to the dendrite of Neuron_3
}