Problem with expsyn

NMODL and the Channel Builder.
Post Reply
ipv1313
Posts: 7
Joined: Wed Nov 09, 2022 3:51 am
Location: Indian Institute of Technology Delhi

Problem with expsyn

Post by ipv1313 »

// Create a list to hold NetCon objects for chemical synapses
objref netcons
netcons = new List()

// Create a list to hold pointers for gap junctions
objref gjs
gjs = new List()

// Define a connection probability
connection_prob = 0.3 // 10% chance of connection

// Randomly connect the neurons with chemical synapses and gap junctions
objref rand, nc, syn
rand = new Random()
rand.Random123(1, 1, 1) // Seed the random number generator

syn_weight = 0.01 // Weight of the synapse
syn_delay = 1 // Delay of the synapse in ms

for i = 0, 39 {
for j = 0, 39 {
if (i != j && rand.uniform(0, 1) < connection_prob) {

// Create an excitatory synapse from neuron i to neuron j
print(7) // To check where the error is
syn = new ExpSyn(dopa_neuron[j].soma(0.5))
print(8)
syn.tau = syn_delay
nc = new NetCon(dopa_neuron.soma(0.5)._ref_v, syn)
nc.weight = syn_weight
printf("Chemical connection from neuron %d to neuron %d\n", i, j)

// Create gap junctions between neurons i and j
dopa_neuron.soma insert gap
dopa_neuron[j].soma insert gap
printf("Gap junction between neuron %d and neuron %d\n", i, j)
print(9)

}
}
}



I am getting error :
bad stack access: expecting (Object **); really (Unknown)
C:\nrn\bin\nrniv.exe: interpreter stack type error
ipv1313
Posts: 7
Joined: Wed Nov 09, 2022 3:51 am
Location: Indian Institute of Technology Delhi

Re: Problem with expsyn

Post by ipv1313 »

Sorry, I learned what the problem was with my code.
Thank you.
Post Reply