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 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 = bInstall
Executable versions of GNU Octave for GNU/Linux systems are provided by the individual distributions. Distributions known to package Octave include Debian, Ubuntu, Fedora, Gentoo, and openSUSE. 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.
Alternatively, many distributions support Flatpak and one can obtain GNU Octave from Flathub.
The Octave Wiki has instructions for installing Octave on macOS 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-64 (recommended)
- octave-4.4.1-w64-installer.exe (~ 238 MB) [signature]
- octave-4.4.1-w64.7z (~ 267 MB) [signature]
- octave-4.4.1-w64.zip (~ 481 MB) [signature]
-
Windows-32 (old computers)
- octave-4.4.1-w32-installer.exe (~ 238 MB) [signature]
- octave-4.4.1-w32.7z (~ 267 MB) [signature]
- octave-4.4.1-w32.zip (~ 481 MB) [signature]
-
Windows-64 (64-bit linear algebra for large data)
Unless your computer has more than ~32GB of memory and you need to solve linear algebra problems with arrays containing more than ~2 billion elements, this version will offer no advantage over the recommended Windows-64 version above.- octave-4.4.1-w64-64-installer.exe (~ 238 MB) [signature]
- octave-4.4.1-w64-64.7z (~ 267 MB) [signature]
- octave-4.4.1-w64-64.zip (~ 481 MB) [signature]
All 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 https://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_nameDevelopment
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/octaveIf you want to participate in Octave development, join the [email protected] mailing list.
GNU Octave 4.4.1 Released
Octave Version 4.4.1 has been released and is now available for download. An official Windows binary installer is also available.