28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

fftw<br />

2-760<br />

This tells you that it takes approximately 1/1000 of a second to execute<br />

fft(y, 1458) a single time.<br />

For comparison, set 'planner' to 'patient'. Since this 'planner' explores<br />

possible algorithms more thoroughly than 'patient', the first time you run<br />

fft, it takes longer to compute the results.<br />

fftw('planner','patient')<br />

tic;Y = fft(y,1458);toc<br />

Elapsed time is 0.130000 seconds.<br />

However, the next time you call fft, it runs approximately 10 times faster than<br />

it when you use the method 'measure'.<br />

tic;for k=1:1000<br />

Y=fft(y,1458);<br />

end;toc<br />

Elapsed time is 0.080000 seconds.<br />

Reusing Optimal FFT Algorithms<br />

In order to use the optimized FFT algorithm in a future MATLAB session, first<br />

save the “wisdom” using the command<br />

str = fftw('wisdom')<br />

You can save str for a future session using the command<br />

save str<br />

The next time you open MATLAB, load str using the command<br />

load str<br />

and then reload the “wisdom” into the FFTW database using the command<br />

fftw('wisdom', str)<br />

See Also fft, fft2, fftn, ifft, ifft2, ifftn, fftshift.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!