Nc=1076; %Number of subcarriers
NFFT=1024 ; %FFT size
%BPSK modulation of each subcarrier
%complex bpsk data symbols
d=randsrc(Nc,1,[-1 1] )+j*randsrc(Nc,1,[-1 1]);
%carriers vector
carr=zeros(NFFT,1);
%place the used carriers in the center of carr vector
carr(NFFT/2-Nc/2+1:NFFT/2+Nc/2)=d;
%create the time-descetete OFDM symbol
s=ifft(carr,NFFT);
Amihomo -- in the code you've posted, why is the data vector placed in the center of the carr vector? What is the purpose of padding both sides of the data with zeros before the ifft?
Amihomo -- in the code you've posted, why is the data vector placed in the center of the carr vector? What is the purpose of padding both sides of the data with zeros before the ifft?
zero padding makes filter design requirments easier to be satisfied.
but in the case of my code, there is no difference where to place the carr vector.
it is done only for centering the spectrum of the OFDM symbol in the plot.this can also be done via fftshift command.