% Copyright (C) 1996 John W. Eaton % This is part of the Octave manual. % For copying conditions, see the file gpl.texi.

\input texinfo

@title{Octave} @subtitle{A high-level interactive language for numerical computations} @subtitle{Edition 2 for Octave version 2.0.2} @subtitle{October 1996} @author{John W. Eaton} Copyright (C) 1996 John W. Eaton.

This is the second edition of the Octave documentation, and is consistent with version 2.0.2 of Octave.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the same conditions as for modified versions.

Preface

Octave was originally intended to be companion software for an undergraduate-level textbook on chemical reactor design being written by James B. Rawlings of the University of Wisconsin-Madison and John G. Ekerdt of the University of Texas.

Clearly, Octave is now much more than just another `courseware' package with limited utility beyond the classroom. Although our initial goals were somewhat vague, we knew that we wanted to create something that would enable students to solve realistic problems, and that they could use for many things other than chemical reactor design problems.

There are those who would say that we should be teaching the students Fortran instead, because that is the computer language of engineering, but every time we have tried that, the students have spent far too much time trying to figure out why their Fortran code crashes and not enough time learning about chemical engineering. With Octave, most students pick up the basics quickly, and are using it confidently in just a few hours.

Although it was originally intended to be used to teach reactor design, it has been used in several other undergraduate and graduate courses in the Chemical Engineering Department at the University of Texas, and the math department at the University of Texas has been using it for teaching differential equations and linear algebra as well. If you find it useful, please let us know. We are always interested to find out how Octave is being used in other places.

Virtually everyone thinks that the name Octave has something to do with music, but it is actually the name of a former professor of mine who wrote a famous textbook on chemical reaction engineering, and who was also well known for his ability to do quick `back of the envelope' calculations. We hope that this software will make it possible for many people to do more ambitious computations just as easily.

Everyone is encouraged to share this software with others under the terms of the GNU General Public License (see section GNU GENERAL PUBLIC LICENSE) as described at the beginning of this manual. You are also encouraged to help make Octave more useful by writing and contributing additional functions for it, and by reporting any problems you may have.

Many people have already contributed to Octave's development. In addition to John W. Eaton, the following people have helped write parts of Octave or helped out in various other ways.

• Thomas Baier (baier@ci.tuwien.ac.at) wrote the original versions of `popen`, `pclose`, `execute`, `sync_system`, and `async_system`.
• Karl Berry (karl@cs.umb.edu) wrote the `kpathsea` library that allows Octave to recursively search directory paths for function and script files.
• Georg Beyerle (gbeyerle@awi-potsdam.de) contributed code to save values in MATLAB's `.mat'-file format, and has provided many useful bug reports and suggestions.
• John Campbell (jcc@bevo.che.wisc.edu) wrote most of the file and C-style input and output functions.
• Brian Fox (bfox@gnu.ai.mit.edu) wrote the `readline` library used for command history editing, and the portion of this manual that documents it.
• Klaus Gebhardt <gebhardt@crunch.ikp.physik.th-darmstadt.de> ported Octave to OS/2 and worked with Michel Juillard <juillard@msh-paris.fr> on the port to DOS.
• A. Scottedward Hodel (scotte@eng.auburn.edu) contributed a number of functions including `expm`, `qzval`, `qzhess`, `syl`, `lyap`, and `balance`.
• Kurt Hornik (Kurt.Hornik@ci.tuwien.ac.at) provided the `corrcoef`, `cov`, `fftconv`, `fftfilt`, `gcd`, `lcd`, `kurtosis`, `null`, `orth`, `poly`, `polyfit`, `roots`, and `skewness` functions, supplied documentation for these and numerous other functions, rewrote the Emacs mode for editing Octave code and provided its documentation, and has helped tremendously with testing. He has also been a constant source of new ideas for improving Octave.
• Phil Johnson (johnsonp@nicco.sscnet.ucla.edu) has helped to make Linux releases available.
• Michel Juillard <juillard@msh-paris.fr> ported Octave to DOS systems.
• Friedrich Leisch (leisch@ci.tuwien.ac.at) provided the `mahalanobis` function.
• Ken Neighbors (wkn@leland.stanford.edu) has provided many useful bug reports and comments on MATLAB compatibility.
• Rick Niles (niles@axp745.gsfc.nasa.gov) rewrote Octave's plotting functions to add line styles and the ability to specify an unlimited number of lines in a single call. He also continues to track down odd incompatibilities and bugs.
• Mark Odegard (meo@sugarland.unocal.com) provided the initial implementation of `fread`, `fwrite`, `feof`, and `ferror`.
• Tony Richardson (tony@guts.biomed.uakron.edu) wrote Octave's image processing functions as well as most of the original polynomial functions.
• R. Bruce Tenison (Bruce.Tenison@eng.auburn.edu) wrote the `hess` and `schur` functions.
• Teresa Twaroch (twaroch@ci.tuwien.ac.at) provided the functions `gls` and `ols`.
• Andreas Weingessel (Andreas.Weingessel@ci.tuwien.ac.at) wrote the audio functions `lin2mu`, `loadaudio`, `mu2lin`, `playaudio`, `record`, `saveaudio`, and `setaudio`.
• Fook Fah Yap (ffy@eng.cam.ac.uk) provided the `fft` and `ifft` functions and valuable bug reports for early versions.

Special thanks to the following people and organizations for supporting the development of Octave:

• Digital Equipment Corporation, for an equipment grant as part of their External Research Program.
• Sun Microsystems, Inc., for an Academic Equipment grant.
• International Business Machines, Inc., for providing equipment as part of a grant to the University of Texas College of Engineering.
• Texaco Chemical Company, for providing funding to continue the development of this software.
• The University of Texas College of Engineering, for providing a Challenge for Excellence Research Supplement, and for providing an Academic Development Funds grant.
• The State of Texas, for providing funding through the Texas Advanced Technology Program under Grant No. 003658-078.
• Noel Bell, Senior Engineer, Texaco Chemical Company, Austin Texas.
• James B. Rawlings, Professor, University of Wisconsin-Madison, Department of Chemical Engineering.
• Richard Stallman, for writing GNU.

Portions of this document have been adapted from the `gawk`, `readline`, `gcc`, and C library manuals, published by the Free Software Foundation, 59 Temple Place--Suite 330, Boston, MA 02111--1307, USA.

This project would not have been possible without the GNU software used in and used to produce Octave.