GNU Octave and reproducible research
Highlights
► GNU Octave is a widely used free software system for numerical computations. ► As free software, GNU Octave is ideally suited for performing reproducible research. ► Octave and other tools may be combined to perform reproducible research.
Introduction
GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. The language Octave uses is quite similar to MATLAB2 so that most programs are easily portable. Octave itself is also portable, and it runs on GNU/Linux, Unix, Mac OS X and Microsoft Windows systems.
The original motivation for writing Octave was to provide software to accompany an undergraduate textbook on chemical reaction engineering written by Jim Rawlings and John Ekerdt. That textbook, Chemical Reactor Analysis and Design Fundamentals is now available, together with Octave code to compute all the figures and examples discussed in the book [1]. The figures and the code used to produce them is available on the web at http://www.che.wisc.edu/~jbraw/chemreacfun. The web pages that display figures and examples are generated automatically from the collection of files that are used to produce the book itself. These web pages are an example of reproducible research, in which the full computational environment that produces a result is available with the article that describes the results. Details of the process that generates the web pages, and the ways Jim Rawlings and I have used similar techniques for other books and papers, is discussed in Section 4.
Although it was originally intended as companion software for a textbook with a limited scope, Octave has evolved to be a general purpose tool for numerical computing and graphics that is used for a wide variety of tasks not related to reactor design. For example, Octave was used as the principal computational tool for an online machine learning course taught by Andrew Ng at Stanford in 2011 that introduced Octave to thousands of new users.3
Octave is also a free software project developed by a community of users. By free software, we mean that Octave is distributed under terms that guarantee certain freedoms for its users. Specifically, the freedom to run, copy, distribute, study, change and improve the software:
- 1.
The freedom to run the program, for any purpose.
- 2.
The freedom to study how the program works and to modify it to do what you wish.
- 3.
The freedom to redistribute verbatim copies.
- 4.
The freedom to distribute modified versions to others.
As a community project, Octave has attracted a wide variety of contributors over the years. More than 250 people have worked on the project in some way, though the group of active developers at any given time is much smaller. I am indebted to all of the people who have worked on Octave, and many significant contributions have been made by community members.
As free software, Octave is an excellent match for doing reproducible research involving numerical computing. There are no hidden parts of Octave, so every part of a computation can be studied and shared with others. It is also easy to combine Octave with other free software tools to produce documents that fully describe the solution to a numerical problem.
Section snippets
A brief history of Octave
In the summer of 1989 while I was a graduate student at the University of Texas, my adviser, Jim Rawlings, asked if I would be interested in writing some software to go along with a chemical reaction engineering textbook he was planning to write with John Ekerdt. I agreed, and our early discussions were about Fortran subroutine libraries that would provide useful tools for undergraduate students using the textbook. We imagined distributing the software on a diskette included with each copy of
Recent developments
The latest version of Octave, 3.6.1, was released February 22, 2012. Recent releases include a number of significant performance enhancements, most of which are the work of Jaroslav Hájek, a volunteer community member. Some highlights of this work include significantly better performance for array indexing operations, expressions combining matrix transposition and division operators, various matrix operations involving mixed real and complex operands, sparse matrix indexing and indexed
Reproducible computational research with Octave and free software tools
Even if you never attempt to reproduce another researcher's results, it is likely that at one time or another you have had the experience of returning to some of your own work after several years, months, or even weeks, and encountering some difficulty determining exactly what you did to generate a table of numbers or a graph. Unless you are extremely conscientious, computing environments like Octave and MATLAB can make things worse as they make it easy to try various computations interactively
Conclusions
With the publication of Chemical Reactor Analysis and Design Fundamentals, the goal of producing a textbook in which the software for all examples is available with the text has been achieved. Octave has become much more widely used than we ever imagined at the start of the project. In addition to using Octave to support the textbook, it is widely used worldwide for teaching numerical analysis, computer programming, simulation, modeling, supporting secondary school instruction, and for a wide
Remembering Ken Muske
I met Ken when he joined Jim Rawlings’ research group at the University of Texas in 1990. During the time when he was working on the code to illustrate the ideas in “Model Predictive Control with Linear Models” my desk was in the office next door to his. We both often worked late at night when it was generally quieter and there were fewer distractions than during the day. Except when there were problems with Ken's code. Or perhaps when he found bugs in MATLAB. I am not sure, as I was somewhat
References (8)
- et al.
Chemical Reactor Analysis and Design Fundamentals
(2002) - et al.
Model predictive control with linear models
AIChE Journal
(1993) - et al.
Electronic documents give reproducible research a new meaning
- J.B. Buckheit, D.L. Donoho, Wavelab and reproducible research, Technical Report 474, Department of Statistics, Stanford...
Cited by (45)
Signal processing basics applied to ecoacoustics
2021, Ecological InformaticsCitation Excerpt :The Matlab codes used for generating all the figures as well as for implementing the presented analysis will be available as supplementary material. For researchers interested in open coding, Octave is a free source alternative to Matlab (Eaton, 2012; Nagar, 2018). Octave is mostly compatible with Matlab (About GNU Octave, n.d.) and can be considered for using the available scripts.
Artificial seawater based long-term culture of colonial ascidians
2021, Developmental BiologyCitation Excerpt :Image analysis was performed manually on the weekly top-view pictures taken using our macrophotography setup. Total number of zooids present on both sides of each microscopy glass slide participating in the experiment was counted using Fiji (Schindelin et al., 2012) and the GNU Octave programming language (Eaton, 2012) with custom scripts was used to process the data. Zooids were identified by their oral siphon, marked using the multi-point region of interest (ROI) tool and organized using the ROI manager functionality of Fiji as compressed ".
Polymeric hollow fibers: Uniform temperature of Li-ion cells in battery modules
2019, Applied Thermal Engineering