i want to add extracellular potetial at the internodes of each segment of my axon model, first i compute xyz coordinates of those nodes, the code is according yours "interpxyz". but i don't insert xtra, so i use vertor to put the xyz coordinates, and i use append to put together, but the 0 and 1 ends of each segment are also included, how to omit these two points in my code? the following is my code. thank you a million.

Code: Select all

```
proc grindaway() { local ii, nn, kk, xr
forsec neurite{
// get the data for the section
nn = n3d()
xx = new Vector(nn)
yy = new Vector(nn)
zz = new Vector(nn)
length = new Vector(nn).........
......
......
xint = new Vector(nseg+2)
yint = new Vector(nseg+2)
zint = new Vector(nseg+2)
xint.interpolate(range, length, xx)
yint.interpolate(range, length, yy)
zint.interpolate(range, length, zz)
[color=#BF80FF]
x_model=new Vector()
y_model=new Vector()
z_model=new Vector()
x_model.append(xint)
y_model.append(yint)
z_model.append(zint)[/color]
}
// Write location information to files
f = new File("D:/home/Model2/my model2/coordinate/x_loca1.dat")
f.wopen()
x_model.vwrite(f)
f.close()
f = new File("D:/home/Model2/my model2/coordinate/y_loca1.dat")
f.wopen()
y_model.vwrite(f)
f.close()
f = new File("D:/home/Model2/my model2/coordinate/z_loca1.dat")
f.wopen()
z_model.vwrite(f)
f.close()
}
```