Azzera filtri
Azzera filtri

compute Fast Fourier Transform matrix

2 visualizzazioni (ultimi 30 giorni)
konoha
konoha il 22 Mag 2016
Risposto: Geoff Hayes il 22 Mag 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

Risposta accettata

Geoff Hayes
Geoff Hayes il 22 Mag 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).

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by