generate an alternating sequence
[sim,y] = ld_alternate( sim, ev, start_with_zero )
y * - output
[0, 1, 0, 1, 0, ... ], if start_with_zero == %T
[1, 0, 1, 0, 1, ... ], if start_with_zero == %F