% funkce pro vytvořená dat potřebných pro vykreslení mezí pásem
function [lower_x, upper_x, lower_y, upper_y] = bandLimits...
         (x_axis, lower_index, upper_index, data_1, data_2)

    lower_x = [x_axis(lower_index) x_axis(lower_index)];
    upper_x = [x_axis(upper_index) x_axis(upper_index)];

    minimum = [min(data_1) min(data_2)];
    minimum = min(minimum);

    maximum = [max(data_1) min(data_2)];
    maximum = max(maximum);

    if (minimum > 0)
       coef_min = 0.9;
    else
        coef_min = 1.1;
    end
    
    if (maximum > 0)
       coef_max = 1.1;
    else
        coef_max = 0.9;
    end


    lower_y = [(minimum*coef_min) (maximum*coef_max)];
    upper_y = [(minimum*coef_min) (maximum*coef_max)];
    
end