EENG 479: Digital Signal Processing: Student Name: ID
EENG 479: Digital Signal Processing: Student Name: ID
COLLEGE OF ENGINEERING
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
Student Name:
ID:
Aim:
-Generate different discrete signals by using “Matlab”
R = 50;
m = 0:R-1;
s = 2*m.*(0.9.^m);
% Generate the uncorrupted signal
d = rand(R,1)-0.5;
% Generate the random noise
x1= s+d';
figure(1)
stem(m,d)
xlabel('Time index n');
ylabel('Amplitude');
title('Noise');
figure(2)
stem(m,x1)
xlabel('Time index n');
ylabel('Amplitude');
title('Signal with Noise');
for n = 1:50;
d = rand(R,1)-0.5;
x = s + d';
x1 = x1 + x;
end
x1 = x1/50;
figure(3)
stem(m,x1);
xlabel('Time index n');
ylabel('Amplitude');
title('Ensemble average');
Generation complex Exponential Sequence
Type in argument = 5
signal
M=1 M=4
Illustration of Convolution
output sequence =
-2 -4 1 3 1 5 1 -3
Filter
[y1,sf]=filter(1,[1,1,-6],8*ones(1,8),[-7,6]);
stem(y1)
hold on;
n=0:7;
y2=-1.8*(-3).^n+4.8*(2).^n-2;
stem(y2,'r*')
M2.9
n=0:1:40;
w=[0 0.1 0.2 0.8 0.9 1 1.1 1.2];
for i=1:8
x=1.5*(cos(w(i)*pi*n))
figure(i)
stem(n,x)
grid
end
W=0pi W=0.1pi
W=0.2pi W=0.8pi
W=0.9pi W=1pi
W=1.1pi W=1.2pi
Note examples
1-Complex eponential sequence
n=0:40;
y=exp((-1/12+j*pi/6)*n);
subplot(2,1,1)
stem(n,real(y))
subplot(2,1,2)
stem(n,imag(y))