GNU Octave

Scientific Programming Language

  • Powerful mathematics-oriented syntax with built-in plotting and visualization tools
  • Free software, runs on GNU/Linux, Mac, BSD, and Windows
  • Drop-in compatible with many Matlab scripts

Syntax Examples

The Octave syntax is largely compatible with Matlab. The Octave interpreter can be run in GUI mode, as a console, or invoked as part of a shell script.

Solve systems of equations with linear algebra operations on vectors and matrices

b = [4; 9; 2] % Column vector
A = [ 3 4 5;
      1 3 1;
      3 5 9 ]
x = A \ b    % Solve the system by inverting A

Visualize data with high-level plot commands in 2D and 3D

x = -10:0.1:10 % Create an evenly-spaced vector from -10..10
y = sin(x)     % y is also a vector
plot(x,y)
More Examples

Install

Executable versions of Octave for GNU/Linux systems are provided by the individual distributions. Distributions known to package Octave include Debian, Ubuntu, Fedora, Gentoo, and SuSE. These packages are created by volunteers. The delay between an Octave source release and the availability of a package for a particular GNU/Linux distribution varies.

The Octave Wiki has instructions for installing Octave on OS X systems. Octave may also be available in third-party package managers such as Homebrew, Macports, or Fink.

Executable versions of Octave for BSD systems are provided by the individual distributions. Both FreeBSD and OpenBSD have Octave packages. These packages are created by volunteers. The delay between an Octave source release and the availability of a package for a particular GNU/Linux distribution varies. The Octave project has no control over that process.

Windows binaries with corresponding source code can be downloaded from https://ftp.gnu.org/gnu/octave/windows/

The latest released version of Octave is always available from ftp://ftp.gnu.org/gnu/octave.

Octave Forge

Octave Forge is a central location for development of packages for GNU Octave, similar to Matlab's toolboxes. To install a package, use the pkg command from the Octave prompt by typing:

pkg install -forge package_name
pkg load package_name

Development

Octave is free software licensed under the GNU General Public License (GPL). Assuming you have Mercurial installed on your machine you may obtain the latest development version of Octave sources with the following command:

hg clone http://www.octave.org/hg/octave

If you want to participate in Octave development, join the maintainers@octave.org mailing list.

RSS

Octave 4.0.0 Released

Version 4.0.0 has been released and is now available for download. Octave 4.0 is a major new release with many new features, including a graphical user interface, support for classdef object-oriented programming, better compatibility with Matlab, and many new and improved functions.

An official Windows binary installer is also available from ftp://ftp.gnu.org/gnu/octave/windows/octave-4.0.0_0-installer.exe

A list of important user-visible changes is available here, by selecting the Release Notes item in the News menu of the GUI, or by typing news at the Octave command prompt.

Thanks to the many people who contributed to this release!