Nmax = 2048; fft_time = zeros(1,Nmax); for n = 1:1:Nmax x = rand(1,n); %Uniformly distributed pseudorandom numbers t = clock;fft(x);fft_time(n)= etime(clock,t); end n = [1:1:Nmax]; plot(n,fft_time,'.') xlabel('N'); ylabel('Time in sec'); title('FFT execution times');
|
请发表评论