Use record with NetCon by a proc call

Anything that doesn't fit elsewhere.
Post Reply
ahajj
Posts: 8
Joined: Fri Jun 16, 2006 10:40 am
Location: Ottawa

Use record with NetCon by a proc call

Post 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!
ahajj
Posts: 8
Joined: Fri Jun 16, 2006 10:40 am
Location: Ottawa

Post 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
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
Post Reply