Derivative block calculation per segment or per section

Anything that doesn't fit elsewhere.
Post Reply
roybens
Posts: 44
Joined: Fri Mar 14, 2008 7:57 am

Derivative block calculation per segment or per section

Post by roybens » Tue Dec 03, 2013 6:56 pm

Hi
When the derivative block is called for a specific mechanism does the state variable have different values for each segment or the same value for the whole section?
When i checked this in a toy model i got the same value for all the segments, if this is true i wonder what is the voltage that is used since each segment has different value (my guess is that its v(0.5) am i correct?)
Thanks
Roy

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

Re: Derivative block calculation per segment or per section

Post by ted » Tue Dec 03, 2013 10:26 pm

roybens wrote:When the derivative block is called for a specific mechanism does the state variable have different values for each segment
STATEs are RANGE by default.
When i checked this in a toy model
Exactly what did the "check" consist of?

roybens
Posts: 44
Joined: Fri Mar 14, 2008 7:57 am

Re: Derivative block calculation per segment or per section

Post by roybens » Wed Dec 04, 2013 1:58 am

Hi Ted,
Your question
Exactly what did the "check" consist of?
made me look over my code again, and i realized my mistake i did not add (x) i did for(x) m_hh instead of m_hh(x) thats why i got the same result (the value in the middle of the section).
Thanks for your answer
Roy

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

Re: Derivative block calculation per segment or per section

Post by ted » Wed Dec 04, 2013 9:32 am

Good that you caught and fixed the problem yourself. That kind of mistake is very easy to commit, can be hard to find in one's own code.

Post Reply