function [y2] = prahuj_amdf(y,vaha) 

    y2 = [];
    prumer = mean(y);

    for i = 1:length(y)
        if y(i) > vaha*prumer
            y2(i) = y(i);
        else
            y2(i) = NaN;
        end
    end

end

                  