Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
54 views

All N K 'Enter The Sequence of Signal '

The document describes a student's lab experiment to calculate the discrete Fourier transform (DFT) and inverse discrete Fourier transform (IDFT) of sequences without using direct MATLAB functions. The student takes input sequences, calculates the DFT using mathematical formulas, and compares the results to MATLAB's FFT function. For the IDFT, the student takes the FFT of a sequence as input, calculates the inverse using formulas, and compares to MATLAB's IFFT. The results match between the student's code and MATLAB functions.

Uploaded by

Gaurav Singh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

All N K 'Enter The Sequence of Signal '

The document describes a student's lab experiment to calculate the discrete Fourier transform (DFT) and inverse discrete Fourier transform (IDFT) of sequences without using direct MATLAB functions. The student takes input sequences, calculates the DFT using mathematical formulas, and compares the results to MATLAB's FFT function. For the IDFT, the student takes the FFT of a sequence as input, calculates the inverse using formulas, and compares to MATLAB's IFFT. The results match between the student's code and MATLAB functions.

Uploaded by

Gaurav Singh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

LAB-3

Gaurav Kumar Singh [11BEE1019]

AIM:
(a) To obtain the discrete Fourier transform of a given sequence without using any direct
MATLAB formula.
(b)To obtain the inverse discrete Fourier transform of a given sequence without using any
direct MATLAB formula.
(a) codeclear all;
clc;
syms n k;
xn=input('enter the sequence of signal = ')
N=length(xn);
x_n=transpose(xn);
n=[0:N-1];
k=[0:N-1];
k1=transpose(k);
nk=-i*k1*n*2*pi/N;
w_nk=exp(nk);
X_K=w_nk*x_n
m=abs(X_K);
A=angle(X_K);
subplot(121)
stem(m)
title('magnitude');
subplot(122)
stem(A)
title('angle');
X_chk=fft(xn)
OUTPUT:
enter the sequence of signal = [1 -2 3 4]
xn =
1 -2

X_K =
6.0000
-2.0000 + 6.0000i
2.0000 - 0.0000i
-2.0000 - 6.0000i

X_chk =
6.0000

-2.0000 + 6.0000i 2.0000

-2.0000 - 6.0000i

(b)
enter the sequence of FFT of signal = [1 1-2*i -1 1+2*i]
X=
1.0000

1.0000 - 2.0000i -1.0000

x_n =
0.5000
1.5000 - 0.0000i
-0.5000 + 0.0000i
-0.5000 + 0.0000i

x_chk =
0.5000

1.5000 -0.5000 -0.5000

1.0000 + 2.0000i

You might also like