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 = b
Install
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.
pkg list
to list them.
Read more.
×
-
Windows-64 (recommended)
- octave-5.1.0-w64-installer.exe (~ 286 MB) [signature]
- octave-5.1.0-w64.7z (~ 279 MB) [signature]
- octave-5.1.0-w64.zip (~ 490 MB) [signature]
-
Windows-32 (old computers)
- octave-5.1.0-w32-installer.exe (~ 275 MB) [signature]
- octave-5.1.0-w32.7z (~ 258 MB) [signature]
- octave-5.1.0-w32.zip (~ 447 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-5.1.0-w64-64-installer.exe (~ 286 MB) [signature]
- octave-5.1.0-w64-64.7z (~ 279 MB) [signature]
- octave-5.1.0-w64-64.zip (~ 490 MB) [signature]
All Windows binaries with corresponding source code can be downloaded from https://ftpmirror.gnu.org/octave/windows/.
The latest released version of Octave is always available from
- https://ftp.gnu.org/gnu/octave
- ftp://ftp.gnu.org/gnu/octave
Please download from https://ftpmirror.gnu.org/octave, which will redirect automatically to a nearby mirror site.
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 https://www.octave.org/hg/octave
If you want to participate in Octave development, join the maintainers@octave.org mailing list.
GNU Octave 5.1.0 Released
GNU Octave version 5.1.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.