Professional Documents
Culture Documents
All All 'Length of The Sequence' 'Input Frequency Is': For End For End
All All 'Length of The Sequence' 'Input Frequency Is': For End For End
bitreversal
end
subplot(3,1,1);
plot(y);
subplot(3,1,2);
plot(r);
% twiddle factor
for i1=1:N/2
w(i1)=exp(-j*2*pi*(i1-1)/N);
end
nos=log2(N);
legd=N/2;
for i1=1:nos
for j1=1:legd
for k=j1:2*legd:N
ul=k;
ll=ul+legd;
temp1=r(ul)+r(ll);
temp2=r(ul)-r(ll);
r(ll)=temp2*w(j1);
r(ul)=temp1;
end
end
legd=legd/2;
len=length(w);
w=w(1:2:len);
end
r=bitrevorder(r);
disp(r);
n=0:1:N-1;
subplot(3,1,3);
plot(n,abs(r));