# Question: Generate (an FFT) matrix from equation and have it simplify as I wish

September 29 2012 by
false
Maple

0

I'm trying to create a matrix that mimcs the FFT equation as seen here. (Note that I don't want to do the transform, I just want the symbolic matrix of it.) I want to make the matrix in terms of the symbol omega, but I also want it to reduce correctly. Here's what I mean:

I used this post to figure out:

> restart; N := 8;> F := Matrix(N, N, proc (i, j) options operator, arrow; omega^((i-1)*(j-1)) end proc);

But I want it to simplify the powers of omega. Omega equals e^{-2*pi/N), so, for instance, omega^N=1. I tried defining omega:

> restart; N := 8;> omega := exp(-(2*Pi*I)/N);> F := Matrix(N, N, proc (i, j) options operator, arrow; omega^((i-1)*(j-1)) end proc);

But that simplifies it to big symbolic values (e.g., (1/2)*sqrt(2)-(1/2*I)*sqrt(2)). I want to keep it in omega. So I tried removing omega and using mod

> restart; N := 8;> F := Matrix(N, N, proc (i, j) options operator, arrow; omega^(mod((i-1)*(j-1), N)) end proc);

This is a lot better since Maple seems to know that omega^0=1. But, of course, omega^{N/2} equals -1 and I can't get Maple to recognize that.

How do I make this matrix in terms of the symbol omega, but simplified correctly? If I delcare omega, it simplifies to numbers. If I don't declare omega, it doesn't reduce correctly.

Thanks.