Info

This question is closed. Reopen it to edit or answer.

fft algorithm for matlab

1 view (last 30 days)
Naga Sai
Naga Sai on 13 Jun 2017
Commented: Naga Sai on 15 Jun 2017
FFT Algorithm or code for matlab
  2 Comments
Adam
Adam on 13 Jun 2017
What about it? Typing at least a sentence is usually helpful if you expect a meaningful answer.
Naga Sai
Naga Sai on 15 Jun 2017
function Y=ft2(y) % This programme is open source code of fast fourier transform in matlab. % Where y is the input argument and p is the normalized size of the input. Let % y = [1 2 3 4 ]; % x= length(y); % m= log(x); % p= ceil(m); % To call the function use % ft2(y);
s=length(y);
l=log(s);
p=ceil(l);
Y=y;
N = 2^p;
N2=N/2;
YY = -pi*sqrt(-1)/N2;
WW = exp(YY);
JJ = 0 : N2-1;
W=WW.^JJ;
for L = 1 : p-1
u=Y(:,1:N2);
v=Y(:,N2+1:N);
t=u+v;
S=W.*(u-v);
Y=[t ; S];
U=W(:,1:2:N2);
W=[U ;U];
N=N2;
N2=N2/2;
end
u=Y(:,1);
v=Y(:,2);
Y=[u+v;u-v];

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!