SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Beirut Arab University
Computer Engineering Program
Spring 2015
Digital Signal Processing (COME 384)
Instructor: Prof. Dr. Hamed Nassar
Fast Fourier Transforms FFT
 Textbook:
◦ V. Ingle and J. Proakis, Digital Signal Processing
Using MATLAB 3rd Ed, Cengage Learning, 2012
1
Dr. Hamed Nassar, Beirut Arab Univ
DSP Windows
 .
Prof. H. Nassar, BAU
DSP Windows
 .
Prof. H. Nassar, BAU
DSP Windows MATLAB code
 n=0:9 %stem ten samples
 RectWin=ones(1,10)
 sub1=subplot(4,1,1); stem(n, RectWin);grid
 title('Rectangular Window');
 TriWin=1-abs(length(n)-1-2*n)/(length(n)-1)
 sub2=subplot(4,1,2); stem(n, TriWin);grid
 title('Triangular Window');
 HannWin=0.5-0.5*cos(2*pi*n/(length(n)-1)))
 sub3=subplot(4,1,3); stem(n, HannWin);grid
 title('Hanning Window');
 HammWin=0.54-0.46*cos(2*pi*n/(length(n)-1))
 sub4=subplot(4,1,4); stem(n, HammWin);grid
 title('Hamming Window');
 linkaxes([sub1,sub2,sub3,sub4], 'y')%Use same y scale for
all subs Prof. H. Nassar, BAU
Constructing an infinite, periodic sequence from a finite
one, and vv
 .
Prof. H. Nassar, BAU
Circular Shift Example: 4 left
 .
Prof. H. Nassar, BAU
Circular convolution
 A linear convolution between two N-point sequences
results in a longer sequence (length=N+N-1, with indices:
0, 1, …, 2N-2).
 But we have to restrict our interval to 0 ≤ n ≤ N − 1,
therefore instead of linear shift, we should consider the
circular shift.
 A convolution operation that contains a circular shift, as
shown below, is called the circular convolution and is
given by
Prof. H. Nassar, BAU
Circular Convolution Example: Time domain approach (watch for circular
folding)
 .
Prof. H. Nassar, BAU
Circular Convolution Example: Frequency domain approach
 .
Prof. H. Nassar, BAU
FFT
 The DFT introduced earlier is the only transform that is
discrete in both the time and the frequency domains, and
is defined for finite-duration sequences.
 Although it is a computable transform, its straightforward
computation is very inefficient, especially when the
sequence length N is large.
 In 1965 Cooley and Tukey showed a procedure to
substantially reduce the amount of computations involved
in the DFT.
 This led to the explosion of other efficient algorithms
collectively known as fast Fourier transform (FFT)
algorithms.
 We will study one such algorithms in detail.
 One concept used that the book does not speak about
explicitly, but it is there (seen the previous example on
circular convolution) is circular folding.
Prof. H. Nassar, BAU
FFT
 .
Prof. H. Nassar, BAU
Example
 .
Prof. H. Nassar, BAU
)
 .
Prof. H. Nassar, BAU
Divide and Conquer Algorithm
 .
Prof. H. Nassar, BAU
Implementation
 .
Prof. H. Nassar, BAU
Implementation
 .
Prof. H. Nassar, BAU
EXAMPLE 5.21 N = 15, L = 3, M =5
 .
Prof. H. Nassar, BAU
EXAMPLE 5.21 N = 15, L = 3, M =5
 .
Prof. H. Nassar, BAU
EXAMPLE 5.21 N = 15, L = 3, M =5
 .
Prof. H. Nassar, BAU
Reminder: Classical DFT MATLAB
script
 % This is a DFT program without loops
 clear all; %Write input sequence below
 nx=0:5; x=[0 1 7 3 1 2] %index vector nx, then input signal
x
 N=length(x);
 wN=exp(-2j*pi/N) %Base
 E=[0:N-1]' *[0:N-1] %Prepare structure of matrix W
 W=wN.^E %Matrix W=Base^Matrix (note the dot .)
 Y=x*W %DFT = input sequence * Matrix
 %To test, we'll obtain x(n=2)=1/N sum_k=0^N-1 Y
e^(j*2*pi*n*k)
 n=2
 k=nx;
 g=exp(2j*pi*n*k/N)
 G=1/N*(Y*g.') Prof. H. Nassar, BAU
FFT Example: N = 6, M=4, L=2
 x = {3, 1, 0, 2, 4, 1,3, 2} => x = {3, 1, 0, 2, 4, 1, 3, 2}
 This has DFT: 10.0, 0.5-2.6i, 2.5+2.6i, 2.0, 2.5-2.6i,
0.5+2.6i
 Always remember that:
◦ the 1D input vector x is first converted (reshaped) into a
row-major matrix xm of size LxM
◦ the corresponding output DFT vector X is obtained as a
column-major matrix X of size LxM, and thus has to be
converted (reshaped) back into a 1D vector.
◦ The best summary of the Divide and Conquer FFT algo:
Prof. H. Nassar, BAU
 clear all; % FFT using Divide & Conquer without loops
 x =[3 1 0 2 4 1 3 2];L=2;M=4; %%Write input sequence and your choice for L and M
 N=length(x)%N can be obtained auto, but M,L u should spec
 x=reshape(x, [L,M]) %Create an LxM matrix (col maj) from x
 wM=exp(-2j*pi/M) %Base M
 EM=[0:M-1]' *[0:M-1]%Prepare structure of matrix W: MxM
 WM=wM.^EM %Raise elements (note .) of Matrix to Base
 WLMF=x*WM %Obtain F matrix
 wN=exp(-2j*pi/N) %Base N
 ELM=[0:L-1]'*[0:M-1] %Prepare structure of twiddle matrix:LxM
 WLMT=wN.^ELM %Twiddle: Raise elements (.) of Matrix to Base
 WLMG=WLMF.*WLMT %Modify elements (note .) of F by Twiddle
 wL=exp(-2j*pi/L) %Base L
 EL=[0:L-1]'*[0:L-1] %Prepare structure of matrix W:LxL
 WL=wL.^EL %Raise elements (note .) of Matrix to Base
 X=WL*WLMG %Final DFT
 %To test, obtain x(n)=1/N sum_k=0^N-1 Y e^(j*2*pi*n*k) for some n
 n=6; k=0:N-1; %MATLAB: u involve vec in an op, u get vec
 XX=[X(1,:) X(2,:)] %Unfold matrix into a vector
 g=exp(2j*pi*n*k/N) %Note in IDFT sign of e is +ve
 G=1/N*(XX*g.') %IDFT for the given n. We could obtain whole x
Prof. H. Nassar, BAU
5
 )
Prof. H. Nassar, BAU

Weitere ähnliche Inhalte

Ähnlich wie DSP_FFT_150525.pptx

Multi-Layer Perceptrons
Multi-Layer PerceptronsMulti-Layer Perceptrons
Multi-Layer Perceptrons
ESCOM
 
EBDSS Max Research Report - Final
EBDSS  Max  Research Report - FinalEBDSS  Max  Research Report - Final
EBDSS Max Research Report - Final
Max Robertson
 
A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...
OctavianPostavaru
 
SURF 2012 Final Report(1)
SURF 2012 Final Report(1)SURF 2012 Final Report(1)
SURF 2012 Final Report(1)
Eric Zhang
 

Ähnlich wie DSP_FFT_150525.pptx (20)

Dycops2019
Dycops2019 Dycops2019
Dycops2019
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
 
c5.pdf
c5.pdfc5.pdf
c5.pdf
 
Numerical Solution and Stability Analysis of Huxley Equation
Numerical Solution and Stability Analysis of Huxley EquationNumerical Solution and Stability Analysis of Huxley Equation
Numerical Solution and Stability Analysis of Huxley Equation
 
Multi-Layer Perceptrons
Multi-Layer PerceptronsMulti-Layer Perceptrons
Multi-Layer Perceptrons
 
EBDSS Max Research Report - Final
EBDSS  Max  Research Report - FinalEBDSS  Max  Research Report - Final
EBDSS Max Research Report - Final
 
TENSOR DECOMPOSITION WITH PYTHON
TENSOR DECOMPOSITION WITH PYTHONTENSOR DECOMPOSITION WITH PYTHON
TENSOR DECOMPOSITION WITH PYTHON
 
A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...A numerical method to solve fractional Fredholm-Volterra integro-differential...
A numerical method to solve fractional Fredholm-Volterra integro-differential...
 
Text file encryption using fft technique in lab view 8.6
Text file encryption using fft technique in lab view 8.6Text file encryption using fft technique in lab view 8.6
Text file encryption using fft technique in lab view 8.6
 
Text file encryption using fft technique in lab view 8.6
Text file encryption using fft technique in lab view 8.6Text file encryption using fft technique in lab view 8.6
Text file encryption using fft technique in lab view 8.6
 
Basics of edge detection and forier transform
Basics of edge detection and forier transformBasics of edge detection and forier transform
Basics of edge detection and forier transform
 
Incremental and Multi-feature Tensor Subspace Learning applied for Background...
Incremental and Multi-feature Tensor Subspace Learning applied for Background...Incremental and Multi-feature Tensor Subspace Learning applied for Background...
Incremental and Multi-feature Tensor Subspace Learning applied for Background...
 
Introduction to TreeNet (2004)
Introduction to TreeNet (2004)Introduction to TreeNet (2004)
Introduction to TreeNet (2004)
 
SURF 2012 Final Report(1)
SURF 2012 Final Report(1)SURF 2012 Final Report(1)
SURF 2012 Final Report(1)
 
Master Thesis on Rotating Cryostats and FFT, DRAFT VERSION
Master Thesis on Rotating Cryostats and FFT, DRAFT VERSIONMaster Thesis on Rotating Cryostats and FFT, DRAFT VERSION
Master Thesis on Rotating Cryostats and FFT, DRAFT VERSION
 
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
ENGINEERING SYSTEM DYNAMICS-TAKE HOME ASSIGNMENT 2018
 
RES701 Research Methodology_FFT
RES701 Research Methodology_FFTRES701 Research Methodology_FFT
RES701 Research Methodology_FFT
 
Noisy Speech Enhancement Using Soft Thresholding on Selected Intrinsic Mode F...
Noisy Speech Enhancement Using Soft Thresholding on Selected Intrinsic Mode F...Noisy Speech Enhancement Using Soft Thresholding on Selected Intrinsic Mode F...
Noisy Speech Enhancement Using Soft Thresholding on Selected Intrinsic Mode F...
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
 

Kürzlich hochgeladen

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 

Kürzlich hochgeladen (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 

DSP_FFT_150525.pptx

  • 1. Beirut Arab University Computer Engineering Program Spring 2015 Digital Signal Processing (COME 384) Instructor: Prof. Dr. Hamed Nassar Fast Fourier Transforms FFT  Textbook: ◦ V. Ingle and J. Proakis, Digital Signal Processing Using MATLAB 3rd Ed, Cengage Learning, 2012 1 Dr. Hamed Nassar, Beirut Arab Univ
  • 2. DSP Windows  . Prof. H. Nassar, BAU
  • 3. DSP Windows  . Prof. H. Nassar, BAU
  • 4. DSP Windows MATLAB code  n=0:9 %stem ten samples  RectWin=ones(1,10)  sub1=subplot(4,1,1); stem(n, RectWin);grid  title('Rectangular Window');  TriWin=1-abs(length(n)-1-2*n)/(length(n)-1)  sub2=subplot(4,1,2); stem(n, TriWin);grid  title('Triangular Window');  HannWin=0.5-0.5*cos(2*pi*n/(length(n)-1)))  sub3=subplot(4,1,3); stem(n, HannWin);grid  title('Hanning Window');  HammWin=0.54-0.46*cos(2*pi*n/(length(n)-1))  sub4=subplot(4,1,4); stem(n, HammWin);grid  title('Hamming Window');  linkaxes([sub1,sub2,sub3,sub4], 'y')%Use same y scale for all subs Prof. H. Nassar, BAU
  • 5. Constructing an infinite, periodic sequence from a finite one, and vv  . Prof. H. Nassar, BAU
  • 6. Circular Shift Example: 4 left  . Prof. H. Nassar, BAU
  • 7. Circular convolution  A linear convolution between two N-point sequences results in a longer sequence (length=N+N-1, with indices: 0, 1, …, 2N-2).  But we have to restrict our interval to 0 ≤ n ≤ N − 1, therefore instead of linear shift, we should consider the circular shift.  A convolution operation that contains a circular shift, as shown below, is called the circular convolution and is given by Prof. H. Nassar, BAU
  • 8. Circular Convolution Example: Time domain approach (watch for circular folding)  . Prof. H. Nassar, BAU
  • 9. Circular Convolution Example: Frequency domain approach  . Prof. H. Nassar, BAU
  • 10. FFT  The DFT introduced earlier is the only transform that is discrete in both the time and the frequency domains, and is defined for finite-duration sequences.  Although it is a computable transform, its straightforward computation is very inefficient, especially when the sequence length N is large.  In 1965 Cooley and Tukey showed a procedure to substantially reduce the amount of computations involved in the DFT.  This led to the explosion of other efficient algorithms collectively known as fast Fourier transform (FFT) algorithms.  We will study one such algorithms in detail.  One concept used that the book does not speak about explicitly, but it is there (seen the previous example on circular convolution) is circular folding. Prof. H. Nassar, BAU
  • 11. FFT  . Prof. H. Nassar, BAU
  • 12. Example  . Prof. H. Nassar, BAU
  • 13. )  . Prof. H. Nassar, BAU
  • 14. Divide and Conquer Algorithm  . Prof. H. Nassar, BAU
  • 17. EXAMPLE 5.21 N = 15, L = 3, M =5  . Prof. H. Nassar, BAU
  • 18. EXAMPLE 5.21 N = 15, L = 3, M =5  . Prof. H. Nassar, BAU
  • 19. EXAMPLE 5.21 N = 15, L = 3, M =5  . Prof. H. Nassar, BAU
  • 20. Reminder: Classical DFT MATLAB script  % This is a DFT program without loops  clear all; %Write input sequence below  nx=0:5; x=[0 1 7 3 1 2] %index vector nx, then input signal x  N=length(x);  wN=exp(-2j*pi/N) %Base  E=[0:N-1]' *[0:N-1] %Prepare structure of matrix W  W=wN.^E %Matrix W=Base^Matrix (note the dot .)  Y=x*W %DFT = input sequence * Matrix  %To test, we'll obtain x(n=2)=1/N sum_k=0^N-1 Y e^(j*2*pi*n*k)  n=2  k=nx;  g=exp(2j*pi*n*k/N)  G=1/N*(Y*g.') Prof. H. Nassar, BAU
  • 21. FFT Example: N = 6, M=4, L=2  x = {3, 1, 0, 2, 4, 1,3, 2} => x = {3, 1, 0, 2, 4, 1, 3, 2}  This has DFT: 10.0, 0.5-2.6i, 2.5+2.6i, 2.0, 2.5-2.6i, 0.5+2.6i  Always remember that: ◦ the 1D input vector x is first converted (reshaped) into a row-major matrix xm of size LxM ◦ the corresponding output DFT vector X is obtained as a column-major matrix X of size LxM, and thus has to be converted (reshaped) back into a 1D vector. ◦ The best summary of the Divide and Conquer FFT algo: Prof. H. Nassar, BAU
  • 22.  clear all; % FFT using Divide & Conquer without loops  x =[3 1 0 2 4 1 3 2];L=2;M=4; %%Write input sequence and your choice for L and M  N=length(x)%N can be obtained auto, but M,L u should spec  x=reshape(x, [L,M]) %Create an LxM matrix (col maj) from x  wM=exp(-2j*pi/M) %Base M  EM=[0:M-1]' *[0:M-1]%Prepare structure of matrix W: MxM  WM=wM.^EM %Raise elements (note .) of Matrix to Base  WLMF=x*WM %Obtain F matrix  wN=exp(-2j*pi/N) %Base N  ELM=[0:L-1]'*[0:M-1] %Prepare structure of twiddle matrix:LxM  WLMT=wN.^ELM %Twiddle: Raise elements (.) of Matrix to Base  WLMG=WLMF.*WLMT %Modify elements (note .) of F by Twiddle  wL=exp(-2j*pi/L) %Base L  EL=[0:L-1]'*[0:L-1] %Prepare structure of matrix W:LxL  WL=wL.^EL %Raise elements (note .) of Matrix to Base  X=WL*WLMG %Final DFT  %To test, obtain x(n)=1/N sum_k=0^N-1 Y e^(j*2*pi*n*k) for some n  n=6; k=0:N-1; %MATLAB: u involve vec in an op, u get vec  XX=[X(1,:) X(2,:)] %Unfold matrix into a vector  g=exp(2j*pi*n*k/N) %Note in IDFT sign of e is +ve  G=1/N*(XX*g.') %IDFT for the given n. We could obtain whole x Prof. H. Nassar, BAU
  • 23. 5  ) Prof. H. Nassar, BAU