Professional Documents
Culture Documents
dft
dft
Input sequence
1 2 3 4
10.0000 + 0.0000i
-2.0000 + 2.0000i
-2.0000 + 0.0000i
-2.0000 - 2.0000i
1.2)
Input sequence
1 2 3 4 5 6 7 8
Columns 1 through 7
36.0000 + 0.0000i -4.0000 + 9.6569i -4.0000 + 4.0000i -4.0000 + 1.6569i -4.0000 + 0.0000i -
4.0000 - 1.6569i -4.0000 - 4.0000i
Column 8
-4.0000 - 9.6569i
1 2 3 4 5 6 7 8
2)
clc; close all; clear all;
x=[1 2 3 4 5];
y1=circshift(x,1);
y2=circshift(x,2);
y3=circshift(x,3);
y4=circshift(x,4);
y5=circshift(x,5);
output
Input sequence
1 2 3 4 5
5 1 2 3 4
4 5 1 2 3
3 4 5 1 2
2 3 4 5 1
1 2 3 4 5
Assignment 2)
clc; clear all; close all;
n=0:31;
N=32;
x=cos(2*pi*10*n/64)
subplot(211)
stem(n,x)
X=fft(x,N)
subplot(212)
stem(n, abs(X))
x=
Columns 1 through 13
1.0000 0.5556 -0.3827 -0.9808 -0.7071 0.1951 0.9239 0.8315 0.0000 -0.8315 -0.9239
-0.1951 0.7071
Columns 14 through 26
0.9808 0.3827 -0.5556 -1.0000 -0.5556 0.3827 0.9808 0.7071 -0.1951 -0.9239 -
0.8315 -0.0000 0.8315
Columns 27 through 32
Columns 1 through 6
-0.0000 + 0.0000i -0.0000 - 0.0000i 0.0000 + 0.0000i -0.0000 + 0.0000i -0.0000 - 0.0000i 16.0000
- 0.0000i
Columns 7 through 12
0.0000 - 0.0000i 0.0000 + 0.0000i -0.0000 + 0.0000i -0.0000 - 0.0000i 0.0000 - 0.0000i 0.0000 +
0.0000i
Columns 13 through 18
-0.0000 + 0.0000i -0.0000 - 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -0.0000 + 0.0000i 0.0000
- 0.0000i
Columns 19 through 24
0.0000 - 0.0000i -0.0000 + 0.0000i -0.0000 - 0.0000i 0.0000 - 0.0000i 0.0000 + 0.0000i -0.0000 +
0.0000i
Columns 25 through 30
-0.0000 - 0.0000i 0.0000 - 0.0000i 0.0000 + 0.0000i 16.0000 + 0.0000i -0.0000 + 0.0000i -0.0000
- 0.0000i
Columns 31 through 32