Exp 1 - DSP
Exp 1 - DSP
Experiment No. 01
Theory:
A discrete signal or discrete time signal is a time series consisting of a sequence of quantities. In other
words, it is a time series that is a function over a domain of integers. Unlike a continuous time signal, a
discrete time signal is not a function of a continuous argument; however, it may have been obtained by
sampling from a continuous time signal, and then each value in the sequence is called a sample. When a
discrete time signal obtained by sampling a sequence corresponds to uniformly spaced times, it has an
associated sampling rate; the sampling rate is not apparent in the data sequence, and so needs to be
associated as a characteristic unit of the system.
Discrete-time signals are represented mathematically as sequences of numbers. A sequence of numbers
x, in which the nth number in the sequence is denoted x[n], is formally written as
x = {x[n]}, −∞ < n < ∞,
where n is an integer. In a practical setting, such sequences can often arise from periodic sampling of an
analog (i.e., continuous-time) signal xa(t). In that case, the numeric value of the nth number in the
sequence is equal to the value of the analog signal, xa(t ), at time nT : i.e.,
x[n] = xa(nT ), −∞ < n < ∞.
The quantity T is the sampling period, and its reciprocal is the sampling frequency.
close all;
clear all;
clc;
N=input('Enter Number of Samples, N = ');
n=-N:N
delta=zeros(1,2*N+1)
stem(n,delta,'color','red');
xlabel('Time');
ylabel('Amplitude');
title('Unit Impulse discrete Signal');
Output 1(a):
n=
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
delta =
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
delta =
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
close all;
clear all;
clc;
N=input('Enter Number of Samples, N = ');
n=-N:N
u=zeros(1,2*N+1)
stem(n,u,'^-
','LineWidth',3,'color','green','MarkerSize',7,'MarkerFaceColor','cyan','Mar
kerEdgeColor','magenta');
axis([-7 7 -0.5 1.5]);
xlabel('Time');
ylabel('Amplitude');
title('Unit Step discrete Signal');
grid on;
Output 1(b):
n=
-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
u=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
u=
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
u=
0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
u=
0 0 0 0 0 0 0 1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
u=
0 0 0 0 0 0 0 1 1 1 1 1 0 0 0
u=
0 0 0 0 0 0 0 1 1 1 1 1 1 0 0
u=
0 0 0 0 0 0 0 1 1 1 1 1 1 1 0
u=
0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
y=
x=
close all;
clear all;
clc;
N=input('Enter Number of Samples, N = ');
n=-N:N
r=zeros(1,2*N+1)
stem(n,r,'o-
','LineWidth',3,'color','green','MarkerSize',2,'MarkerFaceColor','cyan','Mar
kerEdgeColor','magenta');
xlabel('Time --->');
ylabel('Amplitude .....>>');
title('Unit Ramp discrete Signal');
grid on;
Output 1(c):
n=
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0
r=
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 0 0 0 0 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 0 0 0 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 0 0 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 0 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 0 0 0
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 0 0
0 0
r=
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 10
0 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 10
11 0
r=
0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 10
11 12
Questions:
Q.2: What will be happen if base a of exponential signal function is taken as unity?
Answer:
Q.3: Write a command which will convert a discrete graph into a continuous graph.
Answer:
Assessment:
Cognitive Affective Psychomotor Total
(Out of 3) (Out of 3) (Out of 3) (Out of 9)