fs = 128e3 ;
fc = 20e3;
M=16;
type_of_mod='qam';
Down_samp = 2;
test_data = 'my_speech.wav';
siz = wavread(test_data, 'size');
[data, fcar] = wavread(test_data);
x = [data]' ; % coulnm to row vector conversion
sound(x, fcar);
tfplot(x, fs,' Voice', 'speech signal');
s_data = round((M-1)/2*(x + 1)) ;
y1 = my_qammod(s_data, M) ;
y = awgn(y1,20);
z = my_qamdemod(y, M);
z1 = (z - (M-1)/2) / M ;
orig_sp = my_rrcosflt(z1, fcar, fs, .22, 3, 'fs');
sound(orig_sp, fcar);
scale = modnorm(y,'peakpow',1);
y = scale*y; % Scale the constellation.
scatterplot(y); % Plot the scaled constellation.
grid on;
评论0