Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

NC A&T State University

School of Engineering and Technology


Department of Electrical Engineering
EE 749: Digital Communications

Examples of Matched Filters

Eddie Boyd

November 20, 2013

1.
clc
close all
clear all
T= 1;
Dt = 0.002;
t1= 0:Dt:T;
r1 = (t1.^2/2*T).*(1 - t1/(3*T))
fig1 = plot(t1,r1)
set(fig1,'LineWidth',2.5);
hold on
grid on
t2 = T:Dt:2*T;
r2 = (1/(6*T^2)).*(t2.^3 - 3*T.*t2.^2 + 4*T^3)
fig2 = plot(t2,r2)
set(fig2,'LineWidth',2.5);
title('Output of Matched Filter, z(t)','FontWeight','bold')
xlabel('\it t')
ylabel('Amplitude')
str = 'Energy, E_s';
text(.6,.32,str)

2.
clc
close all
clear all
T= 1;
Dt = 0.002;
t1= 0:Dt:T;
r1 = T*sin((pi.*t1/T))/(2.*pi) - (t1/2).*cos((pi.*t1)/T)
fig1 = plot(t1,r1)
set(fig1,'LineWidth',2.5);
hold on
grid on
title('Output of Matched Filter, z(t)','FontWeight','bold')
xlabel('\it t')
ylabel('Amplitude')
t2= T:Dt:2*T;
r2 = (t2/2).*cos((pi.*t2)/T) - T*cos((pi.*t2)/T) (T/(2*pi)).*sin((pi.*t2)/T)
fig2 = plot(t2,r2)
set(fig2,'LineWidth',2.5);
str = 'Max SNR';
text(.5,.5,str)

You might also like