Page 1 of 1

Equation behind Function Table

Posted: Fri Nov 22, 2013 11:08 am
by figoyouwei
Hi,

I am aware that Function Table works when one gives e.g. an array of voltage and an array of variable value.

I want to know what is the linear fit equation behind that ? Basically I don't want to use such Function Table thing, instead just define a function inside the mod file. How I can do that ?

Thanks.

Re: Equation behind Function Table

Posted: Fri Nov 22, 2013 12:43 pm
by ted
Example:

Code: Select all

FUNCTION myfunc(z) {
   myfunc = cosh(z)
}

Re: Equation behind Function Table

Posted: Mon Jul 28, 2014 4:23 pm
by figoyouwei
thank you Ted, yeah , FUNCTION works.

A deeper question:

when a FUNCTION_TABLE is provided, e.g. FUNCTION_TABLE var (v(mV)), if the values of voltage v in the provided table range only from -30 to 50, then what happens to NEURON evaluation when the voltage is below -30 ? Does it take the value for -30 at all other voltage values ?

Re: Equation behind Function Table

Posted: Tue Jul 29, 2014 12:41 pm
by figoyouwei
When the value is out of the TABLE range, it evaluates the nearest point.

Re: Equation behind Function Table

Posted: Tue Jul 29, 2014 1:41 pm
by ted
Yes, sometimes the quickest and easiest way to answer a question is to run a test.