setting a parameter in nmodl
Posted: Thu Aug 30, 2007 11:54 pm
I just figured this out and it wasn't so obvious for me so I though I would share. The following shows how to go about changing a mechanism's parameter in hoc code.
in hoc code you might the have:
The key point here is that in order to change a parameter in a mechanism is to add the suffix to the parameter. Since Neuron seems to have a million global variables adding the suffix helps to prevent name collision.
Code: Select all
NEURON {
SUFFIX xyz
:More Code
}
PARAMETER {
myparam = 3
}
Code: Select all
insert xyz
myparam_xyz = 4
The key point here is that in order to change a parameter in a mechanism is to add the suffix to the parameter. Since Neuron seems to have a million global variables adding the suffix helps to prevent name collision.