function [B_] = SCFDMAdemod_ul (sig)
fftw = 128;
n_samples = 2048/fftw;
N = 72;

i = length(sig);
M = 0;
% výpočet OFDM symbolů
while(i~=0)
    l = mod(M,7);
    if(l==0),
        N_CP_l = 160/n_samples;
    else
        N_CP_l = 144/n_samples;
    end
    i = i - fftw - N_CP_l;
    M = M + 1;
end
nZer = (fftw-N);
index = 0;
B_ = zeros(N, M);

for i = 1:size(B_,2),
    l = mod(i-1,7);
    if(l==0),
        N_CP_l = 160/n_samples;
    else
        N_CP_l = 144/n_samples;
    end
    B__ = fft(sig(index+N_CP_l+1:index+N_CP_l+fftw)*1/sqrt(fftw)/(sqrt(fftw/N)));
    % temp = [B__(1:N/2) B__(N/2+nZer+1:end)]';
    B_(:,i) = [B__(N/2+nZer+1:end) B__(1:N/2)]';
    index = index + fftw + N_CP_l;
end