compute Fast Fourier Transform matrix

2 vues (au cours des 30 derniers jours)
konoha
konoha le 22 Mai 2016
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

Réponse acceptée

Geoff Hayes
Geoff Hayes le 22 Mai 2016
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).

Plus de réponses (0)

Catégories

En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by