You are on page 1of 3

Experiment 3

Object: Write a MATLAB program to generate a Signal:s[n] = 2*n*(0.8^n) Corrupted by the noise d[n] resulting the signal x[n], where x[n]=s[n]+d[n] Also down sample the corrupted signal.

Software Used: MATLAB

Theory: The signal s[n] is the product of two functions. The two functions are namely the ramp function
‘n’ and the exponent power function. The signal is corrupted by noise d[n] which is a random noise. Random noise is defined as noise consisting of large number of transient disturbances with a statistically random time distribution. The input signal corrupted by noise is down sampled. Down sampling is the process of reducing the sampling rate of a signal, which means that the sampled sequence is replaced by a new sequence which is simply every Nth value of the original sampled sequence; that is, Xnew[n] = xoriginal[nN] where N is the Downsampling Factor. This process of extracting Nth sample is also known as Decimation.

In the figure above x[n] is the original signal, xp[n] is sampled signal and xb[n] is downsampled signal

7

subplot(4. end. ylabel('s[n]'). title('Noise Signal').1. ylabel('x[n]'). xlabel('n').Source Code:clear all.4). n=0:1:39.1).d). xlabel('n'). clc.1. stem(n. xlabel('n').3). subplot(4. x(i+1)=s(i+1)+d(i+1). title('Input Signal').2). stem(m. xlabel('n'). s(i+1)=2*i*(0.8. subplot(4. for i=0:39.^i). title('Signal+Noise'). m=0:1:19. title('Downsampled Signal by Factor N=2'). for j=0:19.x). y(j+1)=x(2*(j+1)). ylabel('y[n]'). subplot(4. end. close all.1.40).1.s).y). Results: 8 . stem(n. ylabel('d[n]'). stem(n. d=rand(1.

Conclusion: Signal s[n] is generated and then corrupted by random noise signal d[n] which is then downsampled using MATLAB. 9 .