Page 1 of 1

Use record with NetCon by a proc call

Posted: Fri Jul 14, 2006 11:48 am
by ahajj
Hi, to undertand my question, here's a part of my code

Code: Select all

proc rec() {
	savdata.wopen("FSP_freq_graph.m")	
        ...
}
I would like to use this procedure by typing in the command window
rec("desired_file_name.anything")

I tried this

Code: Select all

savdata.wopen($1)    //but it don't work (seem that neuron only take number with $ sign)
Thanx for the very fast reply Ted and Raj for the other questions I posted!

Posted: Fri Jul 14, 2006 2:54 pm
by ahajj
I found how to do it.
Here how :
savdata.wopen($s1)
With $s#, you can put a string

So now, I can do rec(desired_string)

For more info about procedure go to
http://www.neuron.yale.edu/neuron/stati ... #arguments

Posted: Fri Jul 14, 2006 4:11 pm
by ted
It might save you some time and effort to read chapter 12 of The NEURON Book, which
discusses hoc syntax. A lost day costs more than the price of the book.