GNU Octave is a free and open-source software and high-level programming language, that is similar to MATLAB. As its name suggests it is developed as part of the GNU Project. It can be installed via a number of different methods, the simplest being via Entropy (equo). Alternatively it can be installed via the Science Portage overlay or directly from source code. To install GNU Octave via Entropy one can run:
sudo equo install octave
New GNU Octave releases are made at fairly random time intervals, but it is usually not updated any more frequently than quarterly (that is, every three months), with version 4.0.0 being released over nine months after the latest previous release (3.8.2), for example. This frequency of release is important mostly in the sense that usually Entropy releases of GNU Octave lag behind by at least a month (e.g., version 4.0.0 was released on the 29th of May 2015, while the Entropy package for version 4.0.0 was not released until the 20th of July 2015), hence when a new release of GNU Octave becomes available and one would prefer the latest version as opposed to the version available in the Entropy repositories one may be forced to use either the Science Portage overlay or to install GNU Octave from source code themselves.
Installing GNU Octave using Portage
Note: the commands used in this section need to be run as root user. To enter root run
To install GNU Octave from the Science Portage overlay, firstly sync both emerge and layman:
emerge --sync layman -S
then add the science overlay to Portage, using:
layman -a science
after this one has a choice: either install GNU Octave and all its dependencies using Portage (option A), or install as many dependencies as possible using Entropy and then install what dependencies are left and GNU Octave itself using Portage (option B). Option A is more prone to errors than option B and as it involves compiling several extra pieces of software from source code it will likely take substantially longer than option B.
To do option A run:
emerge -a sci-mathematics/octave
While to do option B, get a list of dependencies by running:
emerge sci-mathematics/octave --ask
equo install ... install as many of these dependencies as possible before running:
to install the remaining dependencies and GNU Octave.