Sunteți pe pagina 1din 3

Submitted by :- Siddhant Raut (6464)

Matlab Assignment
1. Overlap save method

CODE:
h=[1,2,3];
x=[1,3,2,-3,0,2,-1,0,-2,3,2,1];
x1=[zeros(1,2),1,3,2,-3]';
x2=[2,-3,0,2,-1,0]';
x3=[-1,0,-2,3,2,1]';

hn=[1,2,3,0,0,0]';
X1=[x1,circshift(x1,1),circshift(x1,2),circshift(x1,3),circshift(x1,4),circshift(x1,5)];
X2=[x2,circshift(x2,1),circshift(x2,2),circshift(x2,3),circshift(x2,4),circshift(x2,5)];
X3=[x3,circshift(x3,1),circshift(x3,2),circshift(x3,3),circshift(x3,4),circshift(x3,5)];

Y1=(X1*hn)';
Y2=(X2*hn)';
Y3=(X3*hn)';

c=[Y1(3:6),Y2(3:6),Y3(3:6)];

2. Overlap add method

CODE:
h=[1,2,3];
x=[1,3,2,-3,0,2,-1,0,-2,3,2,1];
x1=[1,3,2,-3,zeros(1,2)]';
x2=[0,2,-1,0,zeros(1,2)]';
x3=[-2,3,2,1,zeros(1,2)]';

hn=[1,2,3,0,0,0]';
X1=[x1,circshift(x1,1),circshift(x1,2),circshift(x1,3),circshift(x1,4),circshift(x1,5)];
X2=[x2,circshift(x2,1),circshift(x2,2),circshift(x2,3),circshift(x2,4),circshift(x2,5)];
X3=[x3,circshift(x3,1),circshift(x3,2),circshift(x3,3),circshift(x3,4),circshift(x3,5)];

Y1=(X1*hn)';
Y2=(X2*hn)';
Y3=(X3*hn)';

c=[Y1(1:4),Y1(5:6)+Y2(1:2),Y2(3:4),Y2(5:6)+Y3(1:2),Y3(3:6)];
Properties of the DFT

Because of the relationship between the DFT and the Fourier transform, their properties are quite
similar, except that the DFT X [ k ] is a function of a discrete variable while the Fourier transform
X(R) is a function of a continuous variable. The DFT variables n and k must be restricted to the range
0≤ n, k < N, the DFT shifts x[n - no] or X [ k - k,] imply x[n -no]mod N or X[k - ko] mod N
where the modulo notation [m] mod N means that for some integer i such that

[m] mod N = m + iN
for some integer i such that
0 ≤ [m] mod N < N

For example, if x[n] = δ[n – 3], then


x[n - 4] mod 6 = δ[ n - 7] mod 6 = δ [n – 7 + 6] = δ [ n – 1]

The DFT shift is also known as a circular shift. Basic properties of the DFT are the
following:

1. Linearity

2. Time Shifting:

3. Frequency Shifting

4. Conjugation

where * denotes the complex conjugate


5. Time Reversal
6. Duality

7. Circular Convolution

where

The convolution sum in above Eq. is known as the circular conuolution of x1[n] and
x2[n].

8. Multiplication

where

9. Parseval’s Relation

This is known as Parseval's identity (or Parseval's theorem) for the DFT.

S-ar putea să vă placă și