clear ;
close ;
clc
Nfft=[1024,2048]; %fft size
Nps=[2,4]; %pilot spacing
M=[4,16,64]; %modulation
rate=[1/2];% code rate
for i=Nfft
for j=Nps
for k=M
for m=rate
pol=cyclpoly((i-i/j)*log2(k),(i-i/j)*log2(k)*m);
h=cyclgen((i-i/j)*log2(k),pol);
% savefile=sprintf('ldpc_mat_',num2str(Nfft),'_',num2str(Nps),'_',num2str(M),'_',num2str(rate),'_' );
nameVar = ['ldpc' 'Nfft' num2str(i) 'Nps' num2str(j) 'Mod' num2str(k) ];
save(nameVar,'h')
end
end
end
end
%%%%Example%%%%
%for fft size 1024 with pilot spacing=4 modulation = 4 and code rate 1/2 i
%will need to generate (1024-1024/4)*log2(4) bits in total = 1536
%half of them (768) will be info and the other half (768) is parity bits