Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Freda
Posts:
8
Registered:
1/7/09


Fast Fourier Transform fft2
Posted:
Jan 7, 2009 6:25 AM


There seems to be something wrong with the fft2 function on matlab. This is a simpler file of what im trying to do. It doesn't work properly when the fft2 function is added in. Can anyone see why? Does anyone have another fast Fourier Transform file?
C=complex(rand(128),rand(128)); F=real(fft2(C));
max=100;
NewF=ones(128); for x=1:128 for y=1:128 r=sqrt(x.^2 + y.^2); if r>max NewF(x,y)=0; end if r<=max NewF(x,y)=F(x,y); end end end
imagesc((abs(NewF).^2))



