Rank: 6179 based on 11 downloads (last 30 days) and 1 file submitted
photo

ustc huan

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by ustc
Updated   File Tags Downloads
(last 30 days)
Comments Rating
28 Mar 2009 fft fft code written my me Author: ustc huan fft, signal processing 11 2
  • 1.0
1.0 | 3 ratings
Comments and Ratings on ustc's Files View all
Updated File Comment by Comments Rating
13 Apr 2014 fft fft code written my me Author: ustc huan Zongge

30 Mar 2009 fft fft code written my me Author: ustc huan 9000, Hal

This file is full of garbage. How is this supposed to run?

30 Mar 2009 fft fft code written my me Author: ustc huan Hanselman, Duane

Why is the Database Toolbox required? Here is what is in this file:
function xn=myfft(x)
N=length(x);%È¡Êý×鳤¶È
M=log2(N);%ÇóÊý×鳤¶ÈÒÔ2Ϊµ×µÄÃÝ
%´Ë´¦½«Êý×éxÅÅÐò³Éxtmp
%»ù±¾Ë¼Ï룺½«Ã¿Î»x(i)ÖеÄiµÄÖµ»»Ëã³É2½øÖÆ£¬Ã¿´Î½«×îµÍλȡ³ö±£´æµ½³¤¶ÈΪMµÄÊý×éÖÐ
%¸ÃÊý×éµÄ´ÓµÚMλµ½µÚ1λÅÅ¿ª¾ÍÊÇÅÅÐòºóµÄλÖõĶþ½øÖƱíʾ
%½«¸ÃÊý×é»»Ëã³ÉÊ®½øÖƵÄÊý¾ÍÊÇÐòÊýÖØÅźóµÄÐòÊýpos£¬ÔÙ½«x(i)¸³Óèxtmp(pos)
%ÓÉÓÚmatlabÖÐÊý×é´Ó1¿ªÊ¼£¬¹ÊӦΪx(pos+1)=x(i+1)
xtmp=zeros(1,N);
value=zeros(1,M);
for i=0:N-1
repr=i;
for t=1:1:M
repr=bitshift(i,1-t);
value(t)=bitand(repr,1);
end
pos=0;
for k=1:1:M
pos=pos+value(k)*2^(M-k);
end
xtmp(pos+1)=x(i+1);
end
%xtmp=x;

%fftÖ÷º¯Êý
%Ö÷Ҫ˼Ï룺¹²ÓÐM²ã¼ÆËã
%ÿ²ã°üÀ¨width¿é¼ÆË㣬ÿ¿é¼äÏà¾à2^iµÄ¾àÀ루iΪµÚi²ã£©
%ÿ¿é¼ÆËã°üÀ¨deepth¸öµûÐÎÔËËã
for i=1:M
deepth=2^(i-1);
width=2^(M-i);
for t=1:2^i:N
for k=1:deepth
tmp=xtmp(t+k-1);
wn=width*(k-1);
xtmp(t+k-1)=tmp+exp(-j*2*pi*wn/N)*xtmp(t+k+deepth-1);
xtmp(t+k+deepth-1)=tmp-exp(-j*2*pi*wn/N)*xtmp(t+k+deepth-1);
end
end
end
xn=xtmp;

Contact us