compare block.
[sim,y] = ld_compare_01(sim, events, in, thr)
thr - constant
in - signal
y *
If in > thr: y = 1; else y = 0