0% found this document useful (0 votes)
54 views3 pages

Digital Signal Processing Practical 5

Experiment 5 Discrete Fourier Transform & Inverse Discrete Fourier Transform Program 1: Write a program to find the fast Fourier transform of the given signal. clc; clear All; close All; x=input('Enter The Sequence:-') N=length(x) if (N<=4) D=4-N x=[x zeros(1,D)] elseif(N4) D=8-N x=[x zeros(1,D)] elseif (N8) D=16-N x=[x zeros(1,D)] end N = length(x) for j=1:1:N A=0; for k = 1:1:N R(j)=x(k)*(cos(2*pi*(k-1)*(j-1)/length(x))); A=R(j)+A; end R(j)=A; end R for j=1:1:length(x) ATM

Uploaded by

Atit Patel
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views3 pages

Digital Signal Processing Practical 5

Experiment 5 Discrete Fourier Transform & Inverse Discrete Fourier Transform Program 1: Write a program to find the fast Fourier transform of the given signal. clc; clear All; close All; x=input('Enter The Sequence:-') N=length(x) if (N<=4) D=4-N x=[x zeros(1,D)] elseif(N4) D=8-N x=[x zeros(1,D)] elseif (N8) D=16-N x=[x zeros(1,D)] end N = length(x) for j=1:1:N A=0; for k = 1:1:N R(j)=x(k)*(cos(2*pi*(k-1)*(j-1)/length(x))); A=R(j)+A; end R(j)=A; end R for j=1:1:length(x) ATM

Uploaded by

Atit Patel
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment 5

Discrete Fourier Transform & Inverse Discrete Fourier Transform


Program 1: Write a program to find the fast Fourier transform of the given signal. clc; clear All; close All; x=input('Enter The Sequence:-') N=length(x) if (N<=4) D=4-N x=[x zeros(1,D)] elseif(N<8 && N>4) D=8-N x=[x zeros(1,D)]

elseif (N<16 && N>8) D=16-N x=[x zeros(1,D)] end

N = length(x) for j=1:1:N A=0; for k = 1:1:N R(j)=x(k)*(cos(2*pi*(k-1)*(j-1)/length(x))); A=R(j)+A; end R(j)=A; end R for j=1:1:length(x)

ATMIYA

DIGITAL SIGNAL PROCESSING M.E. (E.C.), 1ST SEMESTER INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.

Experiment 5

Discrete Fourier Transform & Inverse Discrete Fourier Transform


A=0; for k = 1 : 1 : length(x) I(j)=x(k)* (sin((2*pi*(k-1)*(j-1))/length(x))); A=I(j)+A; end I(j)=A; end I new=R+i*I

Ansswer---------Enter The Sequence:-[1 2 3 4] x= 1 N= 4 D= 0 x= 1 N= 4 R= 2 3 4 2 3 4

ATMIYA

DIGITAL SIGNAL PROCESSING M.E. (E.C.), 1ST SEMESTER INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.

Experiment 5

Discrete Fourier Transform & Inverse Discrete Fourier Transform


10.0000 -2.0000 -2.0000 -2.0000 I= 0 -2.0000 new = 10.0000 >> -2.0000 - 2.0000i -2.0000 + 0.0000i -2.0000 + 2.0000i 0.0000 2.0000

ATMIYA

DIGITAL SIGNAL PROCESSING M.E. (E.C.), 1ST SEMESTER INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT.

You might also like