Table 3 - Code added to produce lower sideband signal


 < code prior to this point omitted >


# transform the signal into the frequency domain

s_cxr_am = fft(v_cxr_am) / 512;

# filter the upper sideband, producing a lower-sideband,
# transmitted carrier signal

for n = 34:39
   s_cxr_am(n) = 0.;
endfor
for n = 987:992
   s_cxr_am(n) = 0.;
endfor
v_cxr_am = ifft(s_cxr_am);

# display the frequency domain AM signal

title "FREQUENCY SPECTRUM OF AM SIGNAL AT TRANSMITTER OUTPUT";
xlabel "FREQUENCY IN kHz";
ylabel "AMPLITUDE";
grid
axis([0, 30, 0, 1.1 * abs(max(trunq(s_cxr_am)))]);
plot(w1, abs(trunq(s_cxr_am)), "^");
pause;

 
 < code after this point omitted >
