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 »

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: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: A Question about graph.size()

Post by ted »

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