function [Gprum,om] = gprum(x)
xseg = trame(x,100,0)'; % delka seg. prekryti, chceme segmenty v raduich
[M,N] = size(xseg); 
allgdft = zeros(M,N); 
for ii = 1:M
  seg = xseg(ii,:);
  Gseg = 1/N * abs(fft(seg)).^2; 
  allgdft(ii,:) = Gseg;
end
Gprum = 1/M * sum(allgdft); 
om = (0:N/2-1)/N * 2*pi; Gprum = Gprum(1:N/2); 
%subplot(212); plot (om,Gprum); grid;
