function [traces] = traces_averaging(cut_traces)

    [x,y] = size(cut_traces);
    average = 0;
    pom = 0;
    
    for i = 1 : 5 : x
        pom = pom + 1;
        meas = sprintf('Prumeruji: %s / %s.', num2str(pom), num2str(x/5));
        disp(meas);
        for j = 1 : y
            for k = 1 : 5
                a = cut_traces((i-1+k),j);
                average = average + cut_traces((i-1+k),j);
            end
            average = average/5;
            traces(pom,j) = average;
            average = 0;
        end

    end

end