Using a variable value from a mechanism
Using a variable value from a mechanism
I would like to create a variable and set its value in a channel model mechanism and then have access to that value in a separate mechanism. Is there a way to refer to that variable and use its value? Thanks.
One way to do it is by using pointers. In the target mod (the one that will use the variable set by the source), use the POINTER declaration and set that pointer to the source mechanism using the setpointer command in the .hoc file.
http://www.neuron.yale.edu/neuron/stati ... Statements
There is also an EXTERNAL declaration that could be used, i think, though not sure which is more useful...maybe Ted can explain it.
http://www.neuron.yale.edu/neuron/stati ... Statements
There is also an EXTERNAL declaration that could be used, i think, though not sure which is more useful...maybe Ted can explain it.
-
- Site Admin
- Posts: 6289
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Use POINTER. For specific examples of the use of POINTER, see the gap junction and
continuous transmitter release models in chapter 10 of The NEURON Book
http://www.neuron.yale.edu/ftp/ted/book ... xedref.pdf
I see that the documentation of PARAMETER has been slightly mangled in the html help
files--somehow it got tacked onto the tail end of the documentation of INDEPENDENT.
Until that gets fixed, just start reading at the sentence that begins
"Basically what is needed is a way to implement the hoc statement
section1.var1_mech1(x1) = section2.var2_mech2(x2) . . . "
continuous transmitter release models in chapter 10 of The NEURON Book
http://www.neuron.yale.edu/ftp/ted/book ... xedref.pdf
I see that the documentation of PARAMETER has been slightly mangled in the html help
files--somehow it got tacked onto the tail end of the documentation of INDEPENDENT.
Until that gets fixed, just start reading at the sentence that begins
"Basically what is needed is a way to implement the hoc statement
section1.var1_mech1(x1) = section2.var2_mech2(x2) . . . "