function [xxx,modul]=spektrum(signal,fvz)
S=fft((signal)/length(signal)); % fourierova transformace podelena delkou signalu
modul=((abs(S)).^2);
delka2=length(S);
xxx=0:fvz/length(signal):fvz-1/length(signal);

%---Polovina spektra--------------
delka_xxx=length(xxx); 
delka_xxx=round(delka_xxx/2); %zaokrouhleni delky na cele cislo
xxx=xxx(1:delka_xxx);

delka_modul=length(modul);
delka_modul=round(delka_modul/2);%zaokrouhleni delky na cele cislo
modul=modul(1:delka_modul);