Filter löschen
Filter löschen

compute Fast Fourier Transform matrix

2 Ansichten (letzte 30 Tage)
konoha
konoha am 22 Mai 2016
Beantwortet: Geoff Hayes am 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

Akzeptierte Antwort

Geoff Hayes
Geoff Hayes am 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).

Weitere Antworten (0)

Kategorien

Mehr zu Particle & Nuclear Physics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by