function [V_amp,V_vykon,V_faze,f] = fce_spektra(v_t,f_m,pocet_slozek);

N=length(v_t); 
        
v_f = (fftshift(fft(v_t)))./N;
k=-N/2:N/2-1;
f = k.*pocet_slozek*f_m./N;

V_amp = abs(v_f);           %spektrum amplitudy
V_vykon = V_amp.^2;         %spektrum vykonu 

for q=1:N
    if ((abs(real(v_f(q))) < 1e-1) && (abs(imag(v_f(q))) < 1e-1)) 
        v_f(q)=0;   
    end;
end;
V_faze = angle(v_f);        %spektrum fáze