A Question about graph.size()

Particularly useful chunks of hoc and/or NMODL code. May be pedestrian or stunningly brilliant, may make you gasp or bring tears to your eyes, but always makes you think "I wish I had written that; I'm sure going to steal it."
Post Reply
henrychen1986
Posts: 15
Joined: Wed Nov 25, 2009 7:07 pm

A Question about graph.size()

Post by henrychen1986 » Sun Jun 13, 2010 10:28 pm

Hi,

http://www.neuron.yale.edu/neuron/stati ... .html#size
When I read this reference, I was not able to use this code.

Code: Select all

g.size(&dbl[0])
I got error as

Code: Select all

oc>Graph[0].size(&dbl[0])
/opt/nrn/x86_64/bin/nrniv: dbl not an array variable
 near line 25
 Graph[0].size(&dbl[0])
Thanks in advance!
Best,
-Henry

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

Re: A Question about graph.size()

Post by ted » Sun Jun 13, 2010 11:49 pm

Did you tell hoc that dbl was an array with (at least) 4 elements?
http://www.neuron.yale.edu/neuron/stati ... tml#double

Post Reply