% FFT timings

Nvec    = [1010:1040]; 
ntrials = 2500;

times   = zeros(length(Nvec),1);

for i=1:length(Nvec)

    disp([num2str(Nvec(i))]);
    N=Nvec(i); 
    v=rand(N,1)+1i*rand(N,1); 
    tic; 
    for k=1:ntrials
        w1 = fft(v);
    end
    times(i)=toc;
    
end

figure(2)
times = times/ntrials;
plot(Nvec,times,'-*')
grid, xlabel('N'), ylabel('time (secs)')
title('FFTW computational time')

