## Print more decimal places

Anything that doesn't fit elsewhere.
afc
Posts: 23
Joined: Tue Jul 08, 2014 1:31 pm

### Print more decimal places

Dear NEURON users!!

I am using the impedande class to compute the electrotonic distance of some dendrites. To achieve this I used a slightly modified code from https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=771. The code I am using is the following:

Code: Select all

``````// prepare to use Impedance class

// always a good idea to finitialize before computing impedance
v_init=-70
finitialize(v_init)

// demonstrate use of impedance class

objref zz
zz = new Impedance()

FREQ = 0 // Hz
WHERE = 0.5 // location in the soma that is the reference point

soma distance(0, WHERE)  // sets origin for distance calculations

proc calcZ() {
soma zz.loc(WHERE)  // sets origin for impedance calculations
zz.compute(FREQ, 1) // takes the impedance contributions of
// gating state differential equations into account
// but requires mechanisms to be compatible with CVODE

print "distance(x) ratio(x)"
forall {
print secname()
for (x) if (x==1) print x3d(x), y3d(x), z3d(x), log(1/(zz.ratio(x)))
}
}

calcZ()``````
The neurons are imported to NEURON from a swc. file, and for what i intend to do next, i need to print the xyz coordinates to maximum precision as possible, i.e. with as many decimal places as possible, ideally as many as in the swc. file. Otherwise, I will get some xyz replicates and that really complicates what i want to do next!

Any ideas on how I can print more decimal places??