How would you go about doing this?

The basics of how to develop, test, and use models.
Post Reply
Elqui

How would you go about doing this?

Post by Elqui »

Hi,

I need to change the value of a conductance (in the soma) as the simulation runs depending on the previous history of spiking, number of spikes and frequency, and synaptic inputs (synapses are defined as NetCom/NetStim). What would be the best way to do this? Any suggestions are welcomed.

Edit: would this be somewhere in the book or the website?
Edit2: Even simpler how do you change a global/local variable depending on t or v?

Thanks!
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How would you go about doing this?

Post by ted »

Elqui wrote:I need to change the value of a conductance (in the soma) as the simulation runs depending on the previous history of spiking, number of spikes and frequency, and synaptic inputs (synapses are defined as NetCom/NetStim). What would be the best way to do this?
In the Hot tips area of the forum
viewforum.php?f=28
see the item
How to change parameters during a simulation

The event delivery system actually provides much more flexibility than those examples illustrate. For instance, you can use NetCon.record to call a proc every time there is a spike (or threshold crossing by any variable). The proc can do practically anything--perturb a parameter on each spike, or after every N spikes, or as some function of the interspike interval or average spike frequency, or launch a new event (with cvode.event) that causes something to happen after some delay. Just be sure to call fcurrent or cvode.re_init (as in the current pulse example) immediately after you change any parameter.
Elqui

Re: How would you go about doing this?

Post by Elqui »

Thanks!!
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How would you go about doing this?

Post by ted »

The best thanks will be when it actually works and does something useful.
Post Reply