Communications Toolbox | ![]() ![]() |
Simple Analog Modulation Example
This example illustrates the basic format of the baseband modulation and demodulation commands, amodce
and ademodce
. Although the example uses the AMDSB-TC method, most elements of this example apply to other analog modulation techniques as well. The example samples an analog signal and modulates it. Then it demodulates it and displays the order of magnitude of the variance between the original and demodulated signals.
% Sample the signal for two seconds, % at a rate of 100 samples per second. Fs = 100; t = [0:1/Fs:2]'; % The signal is a sum of sinusoids. x = sin(2*pi*t) + sin(4*pi*t); % Use AMDSB-TC modulation to produce y. y = amodce(x,Fs,'amdsb-tc'); % Demodulate y to recover the message. z = ademodce(y,Fs,'amdsb-tc'); v = floor(log10(var(x-z))) v = -33
![]() | Representing Analog Signals | Other Options in Analog Modulation | ![]() |