function [Y, pocet_oken, pocet_vzorku_okna, remainder] = SEG_A_DOPLN(y, Fs, delka_okna)

    pocet_vzorku_okna = 0.001*Fs*delka_okna;
    remainder = rem(length(y),pocet_vzorku_okna);

    if remainder ~= 0
        y(end+1:pocet_vzorku_okna-remainder+end) = 0;                          %doplneni nulami
    end

    pocet_oken = length(y)/pocet_vzorku_okna;


    Y = reshape(y,pocet_vzorku_okna,pocet_oken);                               %prevedeni na matici oken
    
end