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
Derivative block calculation per segment or per section

 Site Admin
 Posts: 5548
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Derivative block calculation per segment or per section
STATEs are RANGE by default.roybens wrote:When the derivative block is called for a specific mechanism does the state variable have different values for each segment
Exactly what did the "check" consist of?When i checked this in a toy model
Re: Derivative block calculation per segment or per section
Hi Ted,
Your question
Thanks for your answer
Roy
Your question
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).Exactly what did the "check" consist of?
Thanks for your answer
Roy

 Site Admin
 Posts: 5548
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Derivative block calculation per segment or per section
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.