Be the first to rate this file! 5 Downloads (last 30 days) File Size: 1.69 KB File ID: #18892

persistent fft

by Stephen Becker

 

22 Feb 2008 (Updated 25 Feb 2008)

fft via a radix2 algorithm

| Watch this File

File Information
Description

fft via a radix2 algorithm that "recurses" by calling matlab's fft. Rather quick on repeated calls for fft's of the same size, due to persistent variables, but still a little bit slower than matlab's builtin fft.

There is no advantage to using this code over the builtin fft.

Handles complex, vector inputs.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
25 Feb 2008 Duane Hanselman

If as you say "There is no advantage to using this code over the builtin fft." then why post this code? Is it simply an example of code not worth posting?

25 Feb 2008 Stephen Becker

Duane -- good question. I saw a lot of poorly written fft code that also is MUCH slower than matlab's fft; so this is an improvement over those codes. It also demonstrates two ideas: the radix2 FFT algorithm, and why persistent variables are useful.

For example, using persistent variables in this fashion on the discrete cosine transform can yield code much faster than matlab's dct() function. I hope to post such a code once I get it into polished form.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
spectral analysis Stephen Becker 22 Oct 2008 09:50:23
radix2 recursive fft persistent Stephen Becker 22 Oct 2008 09:50:23

Contact us at files@mathworks.com