I am getting a graph where amplitude is zero,How it possible?
I am attchimg here code which generate this graphs
clc;M =8; %here we initialize the number of constellation point of qam
no_of_data_bits=1024;Fm=10^6;%Max freq
block_size = 16; %Size of each OFDM block to add cyclic prefix
cp_len = floor(0.1 * block_size); %Length of the cyclic prefix
data_source= abs(round(randn(1,no_of_data_bits)));%here we take random normal function
figure(1);x=1:no_of_data_bits;stem (x*(1/Fm),data_source);grid minor;xlabel('time(Microsecond)','Fontsize',14);ylabel('amplitude','Fontsize',14);title('Transmitted Data','Fontsize',14);%here we plot that transmitted data
qam_modulated_data = qammod(data_source, M);%here we perform 8bit qam on the random normal function
nqdata = length(qam_modulated_data);data = 0:M-1;scatterplot(qam_modulated_data,1,0,'r*');[udata, uidx] = unique(qam_modulated_data);nudata = length(udata);grid minorfor k=1:nudata text(real(udata(k))-0.4,imag(udata(k))+0.4,num2str(data_source(uidx(k))));endaxis([-4 4 -2 2])qm = abs(qam_modulated_data);figure(3);stem(qm)title('MODULATED TRANSMITTED DATA','Fontsize',14);%here we plot those constellation point
y=ifft(qam_modulated_data);figure(4);x=1:nqdata;stem(x*Fm,abs(y));grid minor; xlabel('freq(Mhz)'); ylabel('amplitude of ifft'); title('without hermitian ifft','Fontsize',14);
I dont know why zero amplitude is coming,please help.
Best Answer