Matlab

To Plot FFT (Fast Fourier Transform Algorithms) For the Given Sequence

Theory:

FFT is a most efficient algorithm used in speech processing, frequency estimation and communication. FFT utilizes full advantage of two symmetry properties in order to provide efficient algorithm for DFT. while considering a divide and conquer approach, a computationally efficient algorithm can be developed. This methods depends on the decomposition of an N-point DFT into successively smaller size then DFTs. While in the N-point sequence, the term N can be expressed as N = r1r2r3, …, rm, then N = r m, can be decimated into r-point sequences For each r point sequence, r-point DFT are often computed. Hence the DFT is of size r. if the number r is called the radix of the FFT algorithm while the number m indicates the number of stages in computation. If the value of r = 2, it is called radix-2 FFT.

Steps involved in finding the FFT of the given sequence:

  • Let’s consider an input sequence as x[n].
  • Let’s find the length for the input sequence using length command.
  • In order to find FFT and IFFT by using the matlab commands fft and ifft.
  • Let’s plot the magnitude and phase response for the given sequence.
  • And finally display the results.

Program:

clc;

clear all;

close all;

x=input(‘Enter the sequence : ‘)

N=length(x)

xK=fft(x,N)

xn=ifft(xK)

n=0:N-1;

subplot (2,2,1);

stem(n,x);

xlabel(‘n—->’);

ylabel(‘amplitude’);

title(‘input sequence’);

subplot (2,2,2);

stem(n,abs(xK));

xlabel(‘n—->’);

ylabel(‘magnitude’);

title(‘magnitude response’);

subplot (2,2,3);

stem(n,angle(xK));

xlabel(‘n—->’);

ylabel(‘phase’);

title(‘Phase response’);

subplot (2,2,4);

stem(n,xn);

xlabel(‘n—->’);

ylabel(‘amplitude’);

title(‘IFFT’);

Output:

Enter the sequence: [3 2 4 5 1]

x = 3     2     4     5     1

N =5

xK =15.0000 + 0.0000i  -3.3541 – 0.3633i   3.3541 – 1.5388i   3.3541 + 1.5388i  -3.3541 + 0.3633i

xn =3.0000    2.0000    4.0000    5.0000    1.0000

Rajeshwari Chiluveru

Share
Published by
Rajeshwari Chiluveru

Recent Posts

What are Template Tags in WordPress? How to Use Template Tags

In wordpress if you are developing new or custom wordpress theme or wordpress plugin then…

2 months ago

Google Search Indexing Issues Started on 31st January to February 2024

If you are experiencing indexing issues of your website then you are not alone and…

3 months ago

Create QR Code for Pages & Post using Plugin in WordPress

On your wordpress website if you want to generate qr code for pages and posts…

3 months ago

Add Google Search Console HTML File Upload on WordPress

If you are trying to verify your WordPress website with google search console with html…

3 months ago

How Do I Add Google Search Console Verification HTML Tag in WordPress?

If you are on wordpress website and wondering how to keep search console html verification…

3 months ago

Why WordPress Too Many Redirects After URL Change

If you are getting too many redirects error on your WordPress website after changing url…

3 months ago