//--------------------------- create two cells----------------------------------------------- objref neuron[2] for i=0,1 neuron[i] = new PYCell(100*i,0,0) //neuron[0] = new PYCell(0,0,0) //neuron[1] = new PYCell(100,0,0) access neuron[0].soma // -----------------connect the cells together----------------------------------------------- objref CellConnection[2] neuron[0].soma CellConnection[0] = new NetCon(&v(.5), neuron[1].syn, -10, 15, .004) neuron[1].soma CellConnection[1] = new NetCon(&v(.5), neuron[0].syn, -10, 15, .004) //------------------connect using a list of NetCon objects------------------------------------ //objref nclist //nclist = new List() //neuron[0].soma nclist.append(new NetCon(&v(.5), neuron[1].syn, -10, 15, .004)) //neuron[1].soma nclist.append(new NetCon(&v(.5), neuron[0].syn, -10, 15, .004)) //Listing a list //nclist.browser() //proc netcon() { // $o1 = source cell $o2 = target cell // $o1.soma nclist.append(new NetCon(&v(.5), $o2.syn, -10, 15, .004)) //} //netcon(neuron[0], neuron[1]) //netcon(neuron[1], neuron[0]) // plot connection neuron[0].addConnection(neuron[1].x, neuron[1].y, neuron[1].z) neuron[1].addConnection(neuron[0].x, neuron[0].y, neuron[0].z)