function y = gel_sinus(x) f = x(1); phi = x(2); t = x(3); gel = sin(2*pi*f*t + phi); if gel >= 0.8 y = 1; else y = 0; end