0% found this document useful (0 votes)
57 views5 pages

Ninevah University College of Electronics Engineering Systems & Control Engineering Department SCE3201 Digital Signal Processing-I Lab

This document discusses representing basic signals in digital signal processing using MATLAB. It defines unit impulse, unit step, ramp, exponential, sinusoidal and other sequences. It provides MATLAB programs to generate these sequences and plot them. It also discusses representing other signals using shifted and scaled versions of basic signals like unit impulse and unit step functions.

Uploaded by

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

Ninevah University College of Electronics Engineering Systems & Control Engineering Department SCE3201 Digital Signal Processing-I Lab

This document discusses representing basic signals in digital signal processing using MATLAB. It defines unit impulse, unit step, ramp, exponential, sinusoidal and other sequences. It provides MATLAB programs to generate these sequences and plot them. It also discusses representing other signals using shifted and scaled versions of basic signals like unit impulse and unit step functions.

Uploaded by

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

Ninevah University

College of Electronics Engineering


Systems & Control Engineering Department
SCE3201 Digital Signal Processing-I Lab.

Exp. No. 1 Representation of Basic Signals in Digital Signal


Processing
Digital Signal Processing-I Experiment No. 1

Introduction

MATLAB stands for MATrix LABoratory. It is a technical computing environment for high
performance numeric computation and visualization. It integrates numerical analysis, matrix
computation, signal processing and graphics in an easy-to-use environment, where problems and
solutions are expressed just as they are written mathematically, without traditional programming.
MATLAB allows us to express the entire algorithm in a few dozen lines, to compute the solution
with great accuracy in a few minutes on a computer, and to readily manipulate a three-
dimensional display of the result in color.

MATLAB is an interactive system whose basic data element is a matrix that does not require
dimensioning. It enables us to solve many numerical problems in a fraction of the time that it
would take to write a program and execute in a language such as FORTRAN, BASIC, or C. It
also features a family of application specific solutions, called toolboxes. Areas in which
toolboxes are available include signal processing, image processing, control systems design,
dynamic systems simulation, systems identification, neural networks, wavelength
communication and others.

It can handle linear, non-linear, continuous-time, discrete-time, multivariable and multirate


systems.

Let us study some special digital sequences that are widely used. We define and plot each of
them as follows:
1. Unit-impulse sequence (digital unit-impulse function):

2. Unit-step sequence (digital unit-step function):

3. Ramp sequence
4. Exponential sequence
5. Sinusoidal sequence

f (n)= A cos ( 2Nπn +α )


2 πn
f (n)= A sin ( +α )
N
Digital Signal Processing-I Experiment No. 1

Procedures:

1. Write a MATLAB programs for the generation of unit impulse, unit step, ramp and
exponential sequences as in the figure below:

clc;
clear all;
close all;

%Program for the generation of unit impulse signal


n=-2:1:2;
y=[zeros(1,2),ones(1,1),zeros(1,2)];
subplot(2,2,1);
stem(n,y)
ylabel('Amplitude');
xlabel('Sample Number');
title('Unit Impulse Signal');

%Program for the generation of unit step sequence u(n)


N=input('enter the total number of samples (N) value ');
t=0:1:N-1;
y1=ones(1,N);
subplot(2,2,2);
stem(t,y1);
ylabel('Amplitude');
xlabel('n');
title('Unit Step Sequence');

%Program for the generation of ramp sequence


n1=input('enter the length of ramp sequence ');
t=0:n1;
subplot(2,2,3);
Digital Signal Processing-I Experiment No. 1

stem(t,t);
ylabel('Amplitude');
xlabel('n');
title('ramp sequence');

%Program for the generation of exponential sequence


n2=input('enter the length of exponential sequence ');
t=0:n2;
a=input('Enter the ‘a’ value ');
y2=exp(a*t);
subplot(2,2,4);
stem(t,y2);
ylabel('Amplitude');
xlabel('n');
title('exponential sequence');

%Program for the generation of Cosine sequence


n=-0:20;
y3=5*[cos((2*n*pi)/10)];
figure(2);
subplot(2,1,1);
stem(n,y3);
ylabel('Amplitude');
xlabel('n');
title('Cosine sequence');

%Program for the generation of Sine sequence


n=-0:20;
y4=5*[sin((2*n*pi)/10)];
figure(2);
subplot(2,1,2);
stem(n,y4);
ylabel('Amplitude');
xlabel('n');
title('Sine sequence');

2. Write a MATLAB program to plot the signals:


a. δ ( n−1 )
b. u(n−1)
c. x ( n )=exp (0.2 n)
3 πn
d. x ( n )=sin
5
Digital Signal Processing-I Experiment No. 1

Discussion

1. A discrete-time signal is defined as:


n
1+ ,−3 ≤ n ≤−1
x ( n )={ 3
1 , 0 ≤ n≤ 3
0 , elsewhere
a. Determine its values and sketch the signal x(n)
b. Can u express the signal x(n) in term of signals δ ( n )∧u ( n ) ?

2. A discrete-time signal x(n) as shown in the figure below:

Sketch and label each of the following signals:


a. x ( n−2 )
b. x ( 4−n )
c. x ( n ) u ( 2−n )
d. x (n−1) δ (n−3)

You might also like