Welcome to the Octave code for D’oh Fourier.

The code  is arranged to be as simple as possible. In that way it should last and be transportable. It has been written on a basic version of Octave and invokes no packages. There is no sophistication here and this code is neither a guide to style nor optimisation. It's aimed to show you that you can get Fourier working, quite easily.  The Octave software is the same as the Matlab but currently omits any of the symbolic code which cuts out quite a bit.  The code has been arranged so that you can just type SectionN_M in Octave (or cut and paste the code) to run each section and generate the material in the book. It is stored as Sections, and the separate components are to be found between the %%%% comments. By this the book is reproducible since most of the Figures (in Octave except in Chapters 1, 2 and 6) can be regenerated. It also means you can play with parameter settings and you are most welcome to. Note that if you choose the wrong values for parameters, then techniques can most certainly fail. This material has been written to help you, and Fourier is a tool is not a panacea. This Octave code is certainly not a good example of software engineering either. 

The Code has been developed from D’oh Fourier’s Matlab code. Generally the translation is pretty trivial and Octave works well for most of this material. Octave is actually miles slower especially for the vanilla DFT (3000 s compared with 70 s by MATLAB) but is slightly faster for the FFT (.0003 s compared with 0.0004 s for MATLAB’s fft, but not for this book’s radix 2 FFT) and with the same error. Octave is slow on images too - it’s likely that the best way to optimise Octave has not been found! (Note that on the web we can find ‘The consensus also seems to suggest that most of MATLAB's performance boost is attributable to its JIT compiler, which compiles large loops at runtime’.) To mitigate this, some of the data and the images are considerably smaller than those in the Matlab version, so the numbers don’t add up with the text. I couldn’t find where Octave said ‘busy’ – it just went quiet!

If you want to reuse this code in your own work, you are most welcome, and please make a citation to D'oh Fourier. There is actually a lot more than is in the book - especially for checking of the code and the results it provides. We accept no liability for any deployment or use of this software. This software has been written only to support D'oh Fourier.

Enjoy! Please send any comments to msn@ecs.soton.ac.uk. If you want to make a GUI and especially to optimise it, go ahead. Send it to me too. If I find it works and I like it, with your permission I'll include it on the site for download.

Best wishes, Mark

