sudo apt-add-repository ppa:octave/stable sudo apt update sudo apt install octave liboctave-dev
Note: if you have Octave installed already, these commands will uninstall your old Octave and install the latest stable version of Octave.
Install addon packages in Octave
Install Octave packages by typing in Octave:
pkg -verbose install -forge specfun
to install the
specfun package, and so on.
Prerequisite Octave Packages will automatically be installed, though outside libraries will need to be installed by you if required by an Octave package.
List the loaded Octave packages
Type in octave
The loaded packages have an asterisk next to their name. You can stop Octave autoload of packages