Simulation / Generation of PAM Signal using MATLAB Code : Pulse Amplitude Modulation Using MATLAB

Pulse-amplitude modulation (PAM), is a modulation scheme where the message is encoded in the amplitude of a series of amplitude pulses. Its an analog modulation scheme in which the amplitudes of a train of carrier pulses are varied according to the amplitude of message signal.

MATLAB Code For PAM  (Pulse-amplitude modulation)
clc;
close all;
clear all;
a = input('Enter the amplitude = ');
f = input('Enter the frequency  = ');
t = 0:0.02:2;
% for a total of 20 samples
x1 = stem(t);
%generation of impulse signal
x2 = sin(2*pi*f*t);
%generation of sine wave
y = x1.*x2;
%modulation step
subplot(3,1,1);
%for impulse signal plot
stem(x1);
title('Impulse Signal');
xlabel('Time');
ylabel('Amplitude ');
subplot(3,1,2) %for sine wave plot
plot(t,x2);
title('Sine Wave');
xlabel('Time ');
ylabel('Amplitude ');
subplot(3,1,3) %for PAM wave plot
stem(t,y);
title('PAM Wave');
xlabel('Time');
ylabel('Amplitude');
Sample Input At MATLAB Command Window:
Enter the amplitude = 4
Enter the frequency  = 3 
Output of PAM wave in MATLAB
Simulation / Generation of PAM Signal using MATLAB Code : Pulse Amplitude Modulation Using MATLAB
Simulation / Generation of PAM Signal using MATLAB Code : Pulse Amplitude Modulation Using MATLAB

1 comment: