Octave on windows

From GHER

Jump to: navigation, search

There are 3 options to use octave on windows with the NetCDF support.


Native Windows port of octave

  • Download the octave installer from https://ftp.gnu.org/gnu/octave/windows/ and run it. I installed octave under "C:\Octave\Octave-4.0.0". You need to adapt the following if you installed octave in a different location.
  • Open octave and execute the following commands (as documented in the C:\Octave\Octave-4.0.0\README.html):
cd C:\Octave\Octave-4.0.0\src
build_packages
  • Load the netcdf package
pkg load netcdf
  • Run the test functions
test_netcdf

You may see some errors that a temporary file cannot be deleted. You can ignore those errors.

Pros:

  • Octave behaves as any Windows program

Cons:

  • GUI version might be unstable and you may need to use the command line version with the entry "Octave (CLI)" in the Windows Menu which is more stable.

Octave with CYGWIN

Follow the information given here: http://wiki.octave.org/Octave_for_Microsoft_Windows#Octave_4.0.0_on_cygwin

  • Install Cygwin: https://cygwin.com/install.html by running setup-x86_64.exe (64-bit windows) or setup-x86.exe (32-bit windows)
  • In the setup program under 'Select Packages' choose the following packages, by clicking one time on "skip":
    • octave
    • octave-netcdf
    • gnuplot
    • xterm
    • xlaunch


Pros:

  • Cygwin has been around since a long time and is well maintained

Cons:

  • Octave will need a X server to run and it does not look like a native application

Octave in Linux on a virtual machine

sudo apt-get install octave liboctave-dev libnetcdf-dev netcdf-bin
  • Start octave by typing in a terminal "octave" and then run the following command:
pkg install -forge netcdf
  • Test with:
pkg load netcdf
test_netcdf
Personal tools