Skip to content Skip to navigation

Connexions

You are here: Home » Content » Program 4: Basic Quick Fourier Transform (QFT)

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

This feature requires Javascript to be enabled.

Program 4: Basic Quick Fourier Transform (QFT)

Module by: C. Sidney Burrus

Summary: Basic Quick Fourier Transform (QFT) Program

Basic QFT Algorithm

A FORTRAN implementation of the basic QFT algorithm is given below to show how the theory is implemented. The program is written for clarity, not to minimize the number of floating point operations.

Figure 1: Simple QFT Fortran Program
C
   SUBROUTINE QDFT(X,Y,XX,YY,NN)
   REAL X(0:260),Y(0:260),XX(0:260),YY(0:260)
   C
   N1 = NN - 1
   N2 = N1/2
   N21 = NN/2
   Q   = 6.283185308/NN
   DO 2 K = 0, N21
      SSX = X(0)
      SSY = Y(0)
      SDX = 0
      SDY = 0
      IF (MOD(NN,2).EQ.0) THEN
         SSX = SSX + COS(3.1426*K)*X(N21)
         SSY = SSY + COS(3.1426*K)*Y(N21)
      ENDIF
      DO 3 N = 1, N2
         SSX = SSX + (X(N) + X(NN-N))*COS(Q*N*K)
         SSY = SSY + (Y(N) + Y(NN-N))*COS(Q*N*K)
         SDX = SDX + (X(N) - X(NN-N))*SIN(Q*N*K)
         SDY = SDY + (Y(N) - Y(NN-N))*SIN(Q*N*K)
3     CONTINUE
      XX(K) = SSX + SDY
      YY(K) = SSY - SDX
      XX(NN-K) = SSX - SDY
      YY(NN-K) = SSY + SDX
2  CONTINUE
   RETURN
   END
 

References

    Comments, questions, feedback, criticisms?

    Send feedback