QUESTION
Use qam.m to see how Quadrature Amplitude Modulation (QAM) works. Implement yourself QAM demodulation. Present screenshots of the results of your matlab-simulated signal demodulation experiments.
\% Quadrature Amplitude Modulation clc; clear all; close all; $\mathrm{fc}_{\mathrm{C}}=40$; $\%$ Carrier frequency in $\mathrm{Hz}$ fml $=2$; \% Modulating frequency in $\mathrm{Hz}$ $\mathrm{fm} 2=5 \%$ Modulating frequency in $\mathrm{Hz}$ $\mathrm{Fs}=1000 ;$ : Sampling frequency in $\mathrm{Hz}$ $\mathrm{t}=0: 1 / \mathrm{Fs}: 1$; $m 1=\cos (2 \star p i \star f m 1 * t)+2{ }^{\star} \cos (3 * p i \star f m 1 * t) ; \circ$ Message signal 1 $\mathrm{m} 2=\cos (2 * p i \star f m 2 * t)+2{ }^{*} \cos (5 * p i \star f m 2 * t) ; \circ$ Message signal 2 $c 1=\cos (2 \star p i \star f c * t) ; \%$ In-phase carrier signal $\mathrm{c} 2=\sin (2 \star p i \star f c \star t) ; \%$ Quadrature-phase carrier signal \% Modulation $\mathrm{x} 1=\mathrm{m} 1 .{ }^{\star} \mathrm{C} 1 ; \%$ Modulated signal 1 $\mathrm{x} 2=\mathrm{m} 2 .{ }^{*} \mathrm{C} 2$; $\%$ Modulated signal 2 $\mathrm{x}=\mathrm{x} 1+\mathrm{x} 2$; \% plots figure (1), subplot (221); plot (t,m1) ylabel ('Amplitude'); xlabel ('Time'); title('Message signal $\left.1^{\prime}\right)$; $\%$ subplot (222); plot (t, m2) ylabel ('Amplitude'); xlabel('Time'); title('Message signal 2'); $\%$ subplot (223); plot (t,c1) ylabel ('Amplitude'); xlabel('Time'); title('Carrier signal'); $\%$ subplot (224); plot (t, $x$ ) ylabel ('Amplitude'); xlabel('Time'); title('QAM signal');