Installation for Scripting: Octave

Navigation:  Toolboxes > Scripting Toolbox > Scripting in Octave/Matlab >

Installation for Scripting: Octave

Previous pageReturn to chapter overviewNext page

What is Octave?

GNU Octave is a high-level language, primarily intended for numerical computations. The package is open source and can be freely distributed. GNU Octave offers functionality similar to Matlab users. If you have experience with Matlab, using Octave will be familiar. Users with no experience with Octave nor Matlab are advised to read a proper introduction to GNU Octave first. You will find lot of pages and videos on the Internet.

Installation

The Windows versions of Octave 8.2.0, 8.1.0, 7.x, 6.x, 5.x, 4.x, 3.8.x, 3.6.x have been tested with 20-sim scripting at the time of this release.

Note that for older versions of Octave only the 32-bit Octave is supported. 64-bit versions of Octave are supported since Octave 4.2.1.

 

First choose the Octave version you wish to install and go to the corresponding section below:

Octave 8.x / 7.x / 6.x / 5.x / 4.x

1.Go to: https://www.gnu.org/software/octave/
2.Go to the download page and download the Windows installer (direct link: https://ftp.gnu.org/gnu/octave/windows/octave-8.2.0-w64-installer.exe)
3.Run the installer and follow the wizard. The steps below assume default installation settings.
4.Octave 4.0.x only: Unfortunately Octave 4.0.x has a Windows specific bug in its internal run() function. This bug is resolved in Octave 4.2 and above.
For Octave 4.0.x you will need to manually replace the default run() implementation with a corrected version. Copy the file:
       C:\Program Files (x86)\20-sim 5.1\Scripting\Octave-patch\4.0.0\run.m
or on 32-bit versions of Windows:
       C:\Program Files\20-sim 5.1\Scripting\Octave-patch\4.0.0\run.m
to:
       C:\Octave\Octave-4.0.0\share\octave\4.0.0\m\miscellaneous\run.m
5.Launch Octave from the Start menu or using the script: C:\Octave\Octave-x.y.z\octave.bat
6.Execute the following commands to make sure that the io, control and signal are installed.

pkg install -forge io

pkg install -forge control

pkg install -forge signal

 

 

OctaveGUI

The Octave GUI.

Your Octave installation is now ready to use.

Octave 3.8.x

1.Go to: http://www.20sim.com/downloads/files/ThirdParty/octave-3.8.2-2-installer.exe
2.Run the installer and follow the wizard.
3.Launch Octave using the script: C:\Octave\Octave-3.8.2\octave.bat
4.Execute the following commands to install packages io, control and signal:

pkg install -forge io

pkg install -forge control

pkg install -forge signal

Your Octave installation is now ready to use.

Octave 3.6.x

1.Go to the Octave download site (http://sourceforge.net/projects/octave/.).
2.Click on the Files tab and click on Octave Windows Binaries.
3.Select the Octave 3.6.4 for Windows MinGW installer.
4.Now you can download the files Octave3.6.4_gcc4.6.2_yyyyxxxx.7z (Octave Installation) and Octave3.6.4_gcc4.6.2_pkgs_yyyyxxxx.7z (Octaveforge Packages).
5.Create an installation directory which doesn't have space chars (i.e. C:\Octave).
6.Unzip the file Octave3.6.4_gcc4.6.2_yyyyxxxx.7z and copy it to the installation directory.
7.Copy the shortcut link C:\Octave\Octave3.6.4_gcc4.6.2.lnk to your desktop. This is a shortcut to start Octave.exe.

Note: Unzipping can be done with programs like 7-zip (http://www.7-zip.org/)

Note: There is a bug with Windows 8 and running Octave. In order to use Octave start Octave with octave.exe -i --line-editing. See the Octave wiki webpage for more information.

8.Unzip the file Octave3.6.4_gcc4.6.2_pkgs_yyyyxxxx.7z and copy it to the installation directory.
9.Launch Octave (e.g. the link to Octave.exe).
10.Execute the following five rebuild commands from the Octave console (e.g. re-type every line followed by ENTER):

pkg rebuild -auto

pkg rebuild -noauto ad

pkg rebuild -noauto nan % shadows many statistics functions

pkg rebuild -noauto gsl % shadows some core functions

pkg rebuild -auto java

OctaveInstallation

The Octave command window.

11.Close and restart Octave.

Setting the Octave Location

1.In the 20-sim Editor choose Tools - Options - Scripting Client - Octave Folder to enter the location where Octave is installed on your computer.