%%%%%%% SURAJ BASTOLA %%%%%%%
%%%%%%%%% QAM Analysis %%%%%%%%%%%%
clear all;
clc
close all;
M = 256;
k = 0:M-1;
Fs = 8000;
[y,Fs] = audioread('C:\Users\suraj\OneDrive\Documents\MIT COLLEGE\Software Defined Radio Communication\MATLAB COding\audioRecorded.wav');
data = dec2bin( typecast( single(y), 'uint8'), 8 ) - '0';
A = qammod(data,M);% QAM symbol generation
x = zeros(1,M);
for i = k
sum = 0;
for m = k
sum = sum + A(m+1)*exp(2i*pi*m*i/M);
end
x(i+1) = sum;
end
x2 = ifft(A,M);
subplot(211);
%plot(abs(x2))
hist(real(x2),5);
title('Real Part')
subplot(212)
hist(imag(x2),5);
%plot(imag(x2))
title('Imaginary Part')
sgtitle('QAM signal generation')
No comments:
Post a Comment