(* Matrix erzeugen *)

M[n_, 1, j_] := {E^(2 Pi I 0 j/n)}

M[n_, k_, j_] := Append[M[n, k - 1, j], E^(2 Pi I (k - 1) j/n)]

F[n_, 1] := {M[n, n, 0]}

F[n_, k_] := Append[F[n, k - 1], M[n, n, k - 1]]

(* Testen *)

N[E^(2 Pi I/4)]

0. + 1. 

M[6, 6, 1]

{1, ^( π)/3, ^(2  π)/3, -1, ^(-(2  π)/3), ^(-( π)/3)}

F[6, 6]

(* F anwenden auf Vektor *)

F[6, 6] . {1, 2, 3, 0, 0, 0}

(* Multiplikation *)

F[6, 6] . {1, 2, 3, 0, 0, 0} F[6, 6] . {2, 1, 1, 0, 0, 0}

(* Konvolution mit Fouriermatrizen *)

N[Inverse[F[6, 6]]] . (F[6, 6] . {1, 2, 3, 0, 0, 0} F[6, 6] . {2, 1, 1, 0, 0, 0} )

{2. + 0. , 5. + 2.22045*10^-16 , 9. - 2.77556*10^-17 , 5. + 0. , 3. + 0. , 1.11022*10^-15 + 2.77556*10^-17 }

(* Konvolution direkt *)

ListConvolve[{1, 2, 3, 0, 0, 0},    {2, 1, 1, 0, 0, 0}, 1]

{2, 5, 9, 5, 3, 0}


Created by Mathematica  (February 15, 2008) Valid XHTML 1.1!