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

Moderator: wwlytton

Post Reply
jackfolla
Posts: 48
Joined: Wed Jul 07, 2010 7:42 am

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

Post 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.
jackfolla
Posts: 48
Joined: Wed Jul 07, 2010 7:42 am

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

Post by jackfolla »

Hi.

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

;)
ted
Site Admin
Posts: 5935
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

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

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