# frequency domain zero padding in OFDM

I have a matlab code for OFDM system, in this code the auther added a zero padded subcarriers before the IFFT stage, in the middle of the raws, and added zero padded guard interval after IFFT, my question is that why i need to add zero padded subcarriers and what is the relation between the number of null subcarriers and sampling frequency??

• Similar question with answer dsp.stackexchange.com/questions/40335/… – AlexTP May 4 '17 at 19:44
• Another one dsp.stackexchange.com/questions/17801/… – AlexTP May 4 '17 at 19:45
• these links did't answer my question, i have a code some thing like this %Data generator (A) rand('state',0); a=-1+2*round(rand(M,1)).'+i*(-1+2*round(rand(M,1))).'; A=length(a); info=zeros(FS,1); info(1: (A/2)) = [ a(1: (A/2)).']; %Zero padding info((FS-((A/2)-1)) :FS) = [ a(((A/2)+1) :A).']; i want to why all of this padded subcarriers is added before IFFT ?? – user24907 May 4 '17 at 20:51
• you can think simply that Fs is FFT size which is power of 2 thus there must be zero padding. However this reason is minor. The main reason is in my two links. – AlexTP May 4 '17 at 22:31
• as i know the FFT size is the number of subcarriers N, not sampling frequency – user24907 May 5 '17 at 6:14