compute Fast Fourier Transform matrix

2 次查看(过去 30 天)
I am trying to make a matrix like
F = [1 1 1;
1 e^(1*2pi) e^(2*2pi);
1 e^(2*2pi) e^4*2pi],
what I have tried is to use for loop,
F = zeros(3);
T = 2*pi;
for i = 1:3
for j = 1:3
F(i,j) = exp((i-1)*T);
end
end
I know my code isn't right. Can someone show me how make matrix F? thanks

采纳的回答

Geoff Hayes
Geoff Hayes 2016-5-22
konoha - try the following
N = 3;
F = zeros(N,N);
for u=1:N
for v=1:N
F(u,v) = exp((u-1)*(v-1)*2*pi);
end
end
You need to use a combination of u and v in the equation in order to get the pattern that you describe above (or found at https://en.wikipedia.org/wiki/DFT_matrix).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Particle & Nuclear Physics 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by