× Need help? Try out our new user and developer forum Octave Discourse

GNU Octave 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 Download Documentation

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 Forge

Octave Forge is a collection of high quality 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

Browse Packages

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

Get involved in Octave development.

×

×