NMODL and the Channel Builder.
- Posts: 17
- Joined: Wed Apr 23, 2014 2:17 pm
I have a couple of mechanisms that need to know the surface area of the section they are inserted into. I tried to achieve this by the following code
Code: Select all
surface_area = 3.141592 * diam * L
I found that diam was correctly specified... but... L was set to 0.0 (not the length of the section). Is there another way for me to access the value of L or the surface area of the section?
- Site Admin
- Posts: 5625
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
Forget about L. NMODL already knows segment area. In the ASSIGNED block declare
then use area in any equation block. Remember to test your mod files with modlunit and use conversion factors as necessary to reconcile unit inconsistencies.