0% found this document useful (0 votes)
39 views2 pages

All All: % Time Variable

Uploaded by

Ridwan Rahii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views2 pages

All All: % Time Variable

Uploaded by

Ridwan Rahii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

clc; clear all; close all;

t = 0:1/8000:3; % time variable


fs = 8000;
fc = 10; % frequency of carrier signal
fm = 1; % frequency of message signal
kpm = pi/2; % phase deviation constant
mt = 1 + sin(6*pi*fm*t); %message signal
ct = cos(2*pi*fc*t); %carrier signal
x = pmmod(mt,fc,fs,kpm); %Modulated signal
y = abs(pmdemod(x,fc,fs,kpm)); %Demodulated signal
subplot(4,1,1)
plot(t,mt,'b','linewidth',2); grid on;
title('Message Signal');
axis([0 3 -1 3]);
subplot(4,1,2)
plot(t,ct,'r','linewidth',2); grid on;
title('Carrier Signal');
subplot(4,1,3)
plot(t,x,'g','linewidth',2); grid on;
title('Phase Modulated Signal');
subplot(4,1,4)
plot(t,y,'m','linewidth',2); grid on;
title('Phase Demodulated Signal');

1
Published with MATLAB® R2017b

You might also like