Page 1 of 1

How to change variable value at a specific time in hoc code

Posted: Tue Dec 20, 2011 6:33 am
by jackfolla
Hi all,
I have the following question.

I would change, in the hoc code, the value of a variable at a specific time (i.e. when t=100 ms) during the simulation.

It is possible? If it is possible, how can I do?

Thanks,
Pasquale.

Re: How to change variable value at a specific time in hoc c

Posted: Tue Dec 20, 2011 7:57 am
by jackfolla
Hi.

I solved the problem with function Vector.play().

;)

Re: How to change variable value at a specific time in hoc c

Posted: Wed Dec 21, 2011 1:56 pm
by ted
Vector play works well as a means for driving a parameter with a continuous forcing function. However, if you merely want to change the parameter's value a few times, it is more efficient to use the event delivery system. See
How to change parameters during a simulation
in the Forum's "Hot tips" section
viewforum.php?f=28