Scientific Programming Language

  • Powerful mathematics-oriented syntax with built-in 2D/3D plotting and visualization tools
  • Free software, runs on GNU/Linux, macOS, BSD, and Microsoft 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. More Octave examples can be found in the Octave wiki.

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 Ax = b

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);
title ("Simple 2-D Plot");
xlabel ("x");
ylabel ("sin (x)");
Click here to see the plot output

Octave Packages

GNU Octave can be extended by packages. Find them at:

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 https://hg.octave.org/octave

News

RSS

GNU Octave 9.3.0 Released – Dec 15, 2024

GNU Octave version 9.3.0 has been released and is now available for download. An official Windows binary installer is available. For macOS see the installation instructions in the wiki.

Example mesh
Example plot
GNU Octave GUI screenshot