function signal = gap_filling (signal,gap)

     pred_signal = signal(:,1);


    for i = 1:(length(pred_signal)-gap)

        if (pred_signal(i) == 1) && (pred_signal(i+gap) == 1)
            pred_signal(i:(i+gap)) = 1;
        end

    end

    signal(:,1) = pred_signal;

end