Page 1 of 1

derivative model has a problem

Posted: Tue May 20, 2014 11:24 am
by okanerkaymaz
hi friend.
i am writing a mod file in neuron and i have no error for compiling.
But, i could not get soma voltage values for at t time.
i didn't understant what it is problem.
my code was shown folowing

Code: Select all


UNITS {
        (mA) = (milliamp)
        (mV) = (millivolt)
	(S) = (siemens)
}
 

NEURON {
       SUFFIX fhn
RANGE x,w
}
 
PARAMETER {
        ep = 0.01 	
        a=0.99
        
       
}
 
STATE {
        x w
}
 
ASSIGNED {
  
}
 
BREAKPOINT {
        SOLVE states METHOD cnexp
    
}

 
 
INITIAL {
	
	x=0
	w=0
}

? states
DERIVATIVE states {  
        
        x' =(1/ep)*(x-(x*x)/3-w)
        w' = x'+a
        
}


what is problem this code?

best regards

Re: derivative model has a problem

Posted: Tue May 20, 2014 11:03 pm
by ted
Apart from the fact that
w' = x'+a
looks like something that modlunit would complain about (have you checked your mod file with modlunit?)--

Why ask about "soma voltage"? Your code doesn't contain anything that refers to membrane potential. Exactly what do you want this mod file to do?

Re: derivative model has a problem

Posted: Wed May 21, 2014 7:33 am
by okanerkaymaz
Hi Ted,
you are right.

part of code is wrong and i fix "w' = x'+a" with "w' = x+a"

i want to use x value like soma.v but i havent get x values for each iteration.
adddition, i have no error compiling mod file

Re: derivative model has a problem

Posted: Wed May 21, 2014 10:56 am
by ted
okanerkaymaz wrote:part of code is wrong and i fix "w' = x'+a" with "w' = x+a"
OK, good that you fixed that.
i want to use x value like soma.v but i havent get x values for each iteration.
adddition, i have no error compiling mod file
I still don't understand what you want to do. If you want your NMODL code to know the value of local membrane potential, in the ASSIGNED block declare
v (mV)
and then you can use v in your equation blocks.