Академический Документы
Профессиональный Документы
Культура Документы
UNIT IMPULSE
UNIT STEP
EXPONENTIAL
RAMP
SINUSODIAL
1
0.9
0.8
0.7
f(n)
0.6
0.5
0.4
0.3
0.2
0.1
0
-25
-20
-15
-10
-5
10
15
20
1
0.9
0.8
0.7
f(n)
0.6
0.5
0.4
0.3
0.2
0.1
0
-20
-15
-10
-5
0
n
10
15
20
25
20
f(n)
15
10
0
-20
-15
-10
-5
10
15
20
25
signum
1
0.8
0.6
0.4
f(n)
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-20
-15
-10
-5
0
n
10
15
20
sinc signal
1
0.8
0.6
f(n)
0.4
0.2
0
-0.2
-0.4
-10
-8
-6
-4
-2
0
n
10
sinusoidal signal
1
0.8
0.6
0.4
f(n)
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-8
-6
-4
-2
10
triangular signal
1
0.8
0.6
0.4
f(n)
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1
-0.8
-0.6
-0.4
-0.2
0
n
0.2
0.4
0.6
0.8
real exponential
350
300
250
f(n)
200
150
100
50
0
-20
-15
-10
-5
0
n
10
15
20
x 10
0.5
0
-0.5
-1
-10
-8
-6
-4
-2
10
10
complex exponential
5000
f(n)
0
-5000
-10000
-10
-8
-6
-4
-2
0
n
EXPERIMENT 2
BASIC OPERATION ON SIGNALS
a)
b)
c)
d)
e)
Shifting
Folding
Time scaling
Signal addition
Signal multiplication
input signal 1
10
input signal 2
x2
x1
5
0
-5
-10
-10
-5
0
n1
-5
-5
10
0
n2
signal addition
10
5
0
-5
-10
-10
-8
-6
-4
-2
0
n
10
subplot(2,1,2)
stem(n,y);
xlabel('n')
ylabel('y')
title('signal multiplication')
input signal 1
10
input signal 2
x2
x1
5
0
-5
-10
-10
-5
0
n1
-5
-5
10
0
n2
signal multiplication
25
20
y
15
10
5
0
-10
-8
-6
-4
-2
0
n
10
title('unit step')
xlabel('n')
ylabel('f(n)')
x1=x+3
subplot(2,2,2)
stem(x1,z)
title('shifted signal')
xlabel('n')
ylabel('f(n+3)')
down sampling
7
6
5
x [n ]
4
3
2
1
0
-1
-2
-2
-1
EXPERIMENT 3
IMPLEMENTATION OF CONVOLUTION SUM
% program for convolution without using standard commands
clc
clear all
close all
x=[1 2 3 4 5]
h=[40 41 42 43 44 45 46 47]
m=length(x);
n=length(h);
if(m>=n)
p=m;
else
p=n;
end
X=[x,zeros(1,n)];
H=[h,zeros(1,m)];
for i=1:n+m-1
Y(i)=0;
for j=1:p
if(i-j+1>0)
Y(i)=Y(i)+X(j)*H(i-j+1);
else
end
end
end
stem(Y);
ylabel('Y[n]');
xlabel('n');
title('convolution of two signals without conv function');
700
600
500
Y[n]
400
300
200
100
0
6
n
10
12
t=1:N;
z(j+1,t+j*L)=y(t);
end
for j=1:length(z)
b(j)=0;
for k=1:d
b(j)=b(j)+z(k,j);
end
end
stem(b);
450
400
350
300
250
200
150
100
50
0
EXPERIMENT 5
10
COMPUTATION OF DFT
% program for computation of DFT
for t=1:45
h(t)=sin(2*pi*(11^11)*t)
end
N=length(h)
n=1:N
y=0
for k=1:N
y=y+h(k)*exp(-j*2*pi*(k-1)*(n-1)/N)
end
subplot(3,1,1)
stem(n,real(y))
title('spectrum of given signal:real part')
xlabel('n')
ylabel('real part:x(n)')
subplot(3,1,2)
stem (n,imag(y))
title('spectrum of given signal:imag part')
xlabel('n')
ylabel('imaginary part of x(n)')
subplot(3,1,3)
stem(n,angle(y))
xlabel('phase')
ylabel('n')
title('angle plot')
0.1
0
-0.1
10
15
20
10
15
20
25
n
angle plot
10
15
20
25
phase
0.05
25
30
n
spectrum of given signal:imag part
35
40
45
30
35
40
45
30
35
40
45
0
-0.05
5
0
-5
EXPERIMENT 4
impulse response
1
0.9
0.8
0.7
y (n )
0.6
0.5
0.4
0.3
0.2
0.1
0
-5
10
15
sample range
20
25
30