Matlab has fft and ifft already to fast calculate discrete Fourier transform and its inverse. However they are binary built-in functions, hence their codes are not visible, which is not helpful to someones who want to understand how FFT works. For teaching and learning purposes, I think we should also have a pair of their readable counterparts, written and stored in plain text (the so-called the Matlab m-functions), which we can step through during their executions. I searched Mathworks file exchange center but did not find any one had contributed such m-functions. Therefore I hope that the m-functions that I am going to contribute will be welcome to the Matlab user community.
To avoid name conflicting, I name my pair of functions sfft and sifft. Using letter s as a prefix is learnt from Professor Gilbert Strang in MIT, who presented slu as readable counterpart to the Matlab built-in function lu for lower and upper triangular matrix factorization I do not know why he chose s at the first place. Perhaps it was derived from the word script, something written in text.
Zhigang Xu (2020). Two Matlab Functions for Understanding How Fast Fourier Transform Works (https://www.mathworks.com/matlabcentral/fileexchange/43801-two-matlab-functions-for-understanding-how-fast-fourier-transform-works), MATLAB Central File Exchange. Retrieved .
Typos in the document are corrected.
Corrected a typo in the description.