i m trying to use a matrix in neuron to save some data which is exported from Matlab to Neuron,which is the weight between neuron cells and i stored them in a file is named "f3" and then read it by scanvar() function
Code: Select all
objectvar f3
f3.ropen("MyDataw.dat")
....
proc connectcells() {local i , j , k localobj src, target, syn, nc
objref m
m = new Matrix(3,3)
nclist = new List()
for i=0, cells.count-1 {
// iterating over sources
for j=0, m.nrow-1 {
for k=0,m.ncol-1 {
m.x[j][k] = f3.scanvar()
if(m.x[j][k]==m.x[k][j] && m.x[j][k]>0){
src = cells.object(j)
target = cells.object(k)
syn = target.synlist.object(0)
// the first object in synlist
// is an ExpSyn with e = 0, therefore an excitatory synapse
nc = src.connect2target(syn)
nclist.append(nc)
nc.delay = 1
nc.weight = 0.01
}
else{
print "Run the program again n Enter a symmetrical Matrix for weights"
}
}
}
}
}
bt when i run this code i face an Error as this:
would u please help me to correct the error?syntax error near line 133
m = new Matrix(3,3)
^