Hello! I'm using this function to perform a simple Fourier Transform:
function four=FourierDir(t,s,nu)% number of points in the time domain
N=length(t);Nf=length(nu);% sampling step in the time domain
Dt=diff(t);Dt(N)=Dt(N-1);four=zeros(1,Nf);for ii=1:Nf four(ii)=sum(Dt.*s.*exp(-1i*2*pi.*t.*nu(ii)));end;
How can I perform the same operation but using the matlab function 'fft' , given the same input parameters t,s,nu? s is the set of data I want to transform along t direction, nu is a vector I define for the number of points.
Thanks for the help
Best Answer