1- i read toturial to use space plot i did every thing that they said, but i see just 2 curves and nothings more, what should i do if i like to have for example 10-20 curve ?
There are lots of tutorials. Which one do you mean?
2-is it possible to write a code in "hoc" to save v(x,t) to a *.dat file?
Yes. Here's the outline for how you would proceed:
1. Identify all sections on the path and append them to a SectionList.
2. For each section in the SectionList, iterate over all internal nodes, creating a Vector
for each node and setting up vector record.
1 is easy. Use hoc code or the GUI to set up your shape plot, and run a simulation to
make sure that what you're seeing is what you want to record.
Then type
allobjects()
at the oc> prompt, and look for a mention of RangeVarPlot. You should see
RangeVarPlot[0] with 1 refs
Then use the RangeVarPlot class's list() method to append all of its sections to a
SectionList, like this:
Code: Select all
objref sl
sl = new SectionList()
RangeVarPlot[0].list(sl)
You can verify that this worked by typing
forsec sl print secname()
at the oc> prompt.
2 is also easy.
Code: Select all
objref veclist, tempvec
veclist = new List()
forsec sl {
for (x,0) {
tempvec = new Vector()
tempvec.record(&v(x))
veclist.append(tempvec)
}
}
objref tempvec // so we can't mess up the last element in veclist
The result is that, for every point along the path where NEURON computes a solution,
there is a corresponding element in veclist that is a Vector which will record the time
course of membrane potential at that point. Now, every time you run a simulation,
these Vectors will automatically capture the time course of membrane potential along
the path(s) you specified.
That will be a lot of data. What you do with it is up to you.
--Ted