the fft file by myself

version 1.0.0.0 (513 Bytes) by yuan baofeng
fft

1.5K Downloads

Updated 9 Jan 2008

No License

function Y=zjfft(x) %????FFT??????????
tic;
x1=changeorder(x); %?????????
N=length(x1); %???????
M=log2(N); %???????
Y=zeros(1,N); %???????N???
B=zeros(1,N);
%------------??????????---------------
Y=x1;
%-------------------??-----------------------

for i=1:M
B=Y;
for r=1:N
%B=Y;
zf=((-1).^floor((r-1)/(2.^(i-1)))); %???
W=exp(-j*2*pi*mod(r-1,2.^(i-1))/2.^i); %?????
Y(r)=zf*B(r)*W.^((zf-1)/(-2))+W.^((zf+1)/2)*B(r+zf*2.^(i-1)); %??????
end
end
toc

Cite As

yuan baofeng (2022). the fft file by myself (https://www.mathworks.com/matlabcentral/fileexchange/18248-the-fft-file-by-myself), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!