Check if pointer is null in NMODL
Posted: Tue Apr 29, 2014 11:39 am
I am curious if the if statement in the code below is valid/good practice:
I am implementing a model that has homeostatically regulated maximal conductances (similar to https://senselab.med.yale.edu/modeldb/S ... odel=93321). The maximal conductances change over time in an activity-dependent manner when the pointer (uPtr) is set. However, sometimes I just want to run the code without this activity-dependent plasticity. In these cases, can I check for the NULL pointer using the code above? The intended outcome is for gbar to not change over time if the pointer is NULL.
Thanks!
Code: Select all
DERIVATIVE state_change
{
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if(uPtr == NULL) {
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
}
Thanks!