Search found 47 matches
- Fri Mar 13, 2009 1:24 pm
- Forum: Other questions
- Topic: adding new template slows down
- Replies: 7
- Views: 2292
Re: adding new template slows down
A wonderful feature of NEURON is that it allows simulations to be coded in many different ways. Unfortunately, when I find one way that works, I often forget to look for a better way. I'll try and develop the reflex to look in the manuals for alternate ways. Thank you for offering to write a mod fil...
- Fri Mar 13, 2009 9:47 am
- Forum: Other questions
- Topic: adding new template slows down
- Replies: 7
- Views: 2292
Re: adding new template slows down
Thanks for the design tips. The exponential slowing down of new instances was due to the multiple use of PointProcessManager. I used this because I was reproducing an example I found of VectorPlay. Replacing the PointProcessManager with IClamp eliminated the exponential slowing down. I didn't know t...
- Tue Mar 10, 2009 10:30 pm
- Forum: Other questions
- Topic: adding new template slows down
- Replies: 7
- Views: 2292
adding new template slows down
I generated the following template (it works well): begintemplate tpTCN external newseed, grDur, stimulatortime public soma,vcell,gnoise,electrode,stimulator create soma objref vcell,gnoise,electrode,stimulator proc init() { access soma soma { nseg = 1 diam = 76.58 L = 100 cm = 1 insert hh2 ena = 50...
- Tue Mar 10, 2009 10:05 pm
- Forum: Other questions
- Topic: pass Vector as argument to a function
- Replies: 7
- Views: 3841
Re: pass Vector as argument to a function
This is nice.
Thanks,
Pierre
Thanks,
Pierre
- Mon Mar 09, 2009 10:38 am
- Forum: Other questions
- Topic: pass Vector as argument to a function
- Replies: 7
- Views: 3841
Re: pass Vector as argument to a function
Because it doesn't work. Could you please indicate what is required to make it work?
Thanks,
Pierre
Thanks,
Pierre
- Mon Mar 09, 2009 10:23 am
- Forum: Other questions
- Topic: pass Vector as argument to a function
- Replies: 7
- Views: 3841
Re: pass Vector as argument to a function
Thank you, that worked well. Here is a related question. Can I pass an array of objects, as shown below for example? objref ab[2][3] ab[0][0]=new Vector(10,0) ab[0][1]=new Vector(10,01) ab[0][2]=new Vector(10,02) ab[1][0]=new Vector(10,10) ab[1][1]=new Vector(10,11) ab[1][2]=new Vector(10,12) proc s...
- Sat Mar 07, 2009 3:23 pm
- Forum: Other questions
- Topic: pass Vector as argument to a function
- Replies: 7
- Views: 3841
pass Vector as argument to a function
Is it possible to pass a Vector() as an argument to a function? For example: objref src src=new Vector(5,99) func readvector() { return $&1.x[3] // I want to have access to all other methods and properties of Vector() } print readvector(&src) If not possible for a function, then is it possible for a...
- Sat Aug 04, 2007 1:35 pm
- Forum: Other questions
- Topic: odd result
- Replies: 3
- Views: 2234
- Sat Aug 04, 2007 12:47 pm
- Forum: Other questions
- Topic: odd result
- Replies: 3
- Views: 2234
- Sat Aug 04, 2007 11:10 am
- Forum: Other questions
- Topic: odd result
- Replies: 3
- Views: 2234
odd result
The following for loop works perfectly: objref rp rp = new Random() rp.poisson(3) proc loadqueue() { local tm for (tm=rp.repick+1; tm<=20; tm=tm+rp.repick+1) print tm // for loop } loadqueue() But the same for loop in a different context does not work: objref rec soma rec = new ExpSyn(0.5) objref rp...
- Fri Aug 03, 2007 3:40 pm
- Forum: Other questions
- Topic: Random NetCon
- Replies: 5
- Views: 3314
Does NetStim have a method to get the next value? Something like: objref ns ns = new NetStim() ns.noise=.9 for i=0,10 print ns.value() The only way I know how to get the values is to run() a simulation: create dend access dend objref ns ns = new NetStim(.5) objref vec, nc, nil vec = new Vector() nc ...
- Fri Aug 03, 2007 12:08 pm
- Forum: Other questions
- Topic: Random NetCon
- Replies: 5
- Views: 3314
- Thu Aug 02, 2007 5:21 pm
- Forum: Other questions
- Topic: Random NetCon
- Replies: 5
- Views: 3314
Random NetCon
To send random signals to NetCon I can successfuly use NetStim: create dend objref rec dend rec = new ExpSyn(0.5) objref ns dend ns = new NetStim(.5) ns.noise=.9 objref nc dend nc=new NetCon(ns, rec, 0, 0, 1.0) tstop=300 run() Is it possible to use Random? The closest I get is: create dend objref re...
- Sat Mar 03, 2007 3:28 pm
- Forum: Other questions
- Topic: ACG amplitude
- Replies: 6
- Views: 4772
Thanks again for your help. I got it now! The random numbers returned by the function r.ACG() should NOT be rescaled. I suspect that is why the function does not provide the means for the returned values to be rescaled. I will use the Random class functions that allow rescaling (e.g. uniform). Thank...
- Sat Mar 03, 2007 2:40 pm
- Forum: Other questions
- Topic: ACG amplitude
- Replies: 6
- Views: 4772
Thank you for your help. I have a copy of Numerical Recipies in C. I will look up the chapter on random numbers. If I understood correctly, I can't set r.ACG(7) to return random numbers scaled by a user defined factor. So I would have to do something like use ACG() to create a vector, scale the vect...