TITLE Sine wave with lag : SCoP example of the use of the LAG directive. lagwave : is a delayed version of the sine function x. : Simulation Resources, Inc. : August 27, 1996 PARAMETER { a = 1. : Amplitude delay = 2. (sec) : Delay time } INDEPENDENT { time FROM 0 TO 20 WITH 200 (sec) } ASSIGNED { lagwave FROM -1.5 TO 1.5 } STATE { x FROM -1.5 TO 1.5 START 1 y FROM -1.5 TO 1.5 } DERIVATIVE rates { LAG x BY delay x' = a * y y' = - a * x lagwave = lag_x_delay } BREAKPOINT { SOLVE rates } PLOT x, lagwave VS time