Scientific Computing Software--octave installation

Source: Internet
Author: User
Tags install homebrew homebrew cask

Octave is an open source scientific computing and numerical analysis tool designed to provide compatibility with MATLAB syntax, and is a powerful competitive product for MATLAB commercial software.

Reference: "Ml:octave Installation"

General

installation files for all platforms is available at the GNU Octave Repository on SourceForge.

The Gnu Octave Wiki has installation instructions for Windows and Mac OS x.

The present instance of the course was tested using Octave 3.8.2. Earlier versions of Octave is not guaranteed to work. Very Early versions is known to does work for the submit.m script.

WindowsVersion 4.0.0

Octave 4.0.0 are available, but have a bug in its printf () function which impacts the SUBMIT.M script for all exercises. Workarounds is available via the discussion forums. The present instance of the course also uses a SSL method in the Submit.m script, which can throw errors with security cer Tificate access to the grader server. Workarounds is available via the discussion forums.

Version 3.6.4
    • The "Microsoft Visual Studio" or "Windows MinGW" version installers can is downloaded from Sourceforge.
    • On Windows 8, console-related problem whereby Octave crashes and disappears at any syntax error; Fix is detailed atstackoverflow.com
Version 3.6.2
    • This Bug-fix version is released on 5 June 2012. The "Microsoft Visual Studio" version installer can downloaded fromsourceforge. It seems more reliable than the MinGW 3.6.1 version, although some annoying bugs has been retained.
    • When the installing this version from Cygwin, urlread /could urlwrite fail, resulting in a error message like: /usr/lib/octave/3.6.2/oct/i686-pc-cygwin/urlwrite.oct: failed to load: No such process . Thus the submit function provided with programming exercises also fails ( submitWeb still works).
      I successfully worked around this by replacing and the file from the urlwrite.oct octave/cygwin 3.6.1 binary distribution. (Problem have also been mentioned in this thread for ml-2012-002.)
Version 3.6.1
    • The most recent version was from 3/5/2012 and at the Sourceforge site. Installation instructions for Windows and Cygwin is on the Wiki.
    • If you have problems with crashes during (re-) plotting, see this bug in report concerning Libblas.dll versions. You can probably reproduce this problem by typing the command:

      Demo Plotyy

If you had the wrong version of Libblas.dll installed, this would generally crash Octave. The Libblas.dll.ref version is a slow but stable version.

Version 3.2.4
    • The tutorial on the course website are actually for version 3.2.4. This version was considered "very old" by the Octave Wiki. This version have a bug in the Readline.dll file, causes garbage characters to show up when attempting to use command l INE history editing. Versions 3.4 and higher fix this.
    • Sometimes problems occur with Octave and gnuPlot if you have Oct2mat module loaded. Try "pkg unload Oct2mat ' When you first run Octave. If that solves the problem you can make it permanent by either adding the line to your config file, or by executing "pkg u Ninstall Oct2mat "command[1].
Mac OS XVersion 3.8.1

If you aren't afraid of the Terminal you can use Homebrew. This was by far the easiest method of installing everything, which is needed. In fact, this May is the best option for versions of X prior to 10.9 Mavericks, because the Octave wiki states that Binary installer is-to-be used ' at your own risk ' and is ' not guaranteed to work ' with anything other than OSX 10.9 Maveri Cks.

Let ' s install Homebrew as the easiest solution. Open Terminal and type the installation command below, which is listed on the Homebrew home page also, and then hits Enter:

Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

You'll need a set of command line tools, that is a subset of XCode. If you're comfortable with the Terminal and then use the command below to install just what's needed. Otherwise (or if you are issues), you need to install XCode from App Store, go to the Xcode preferences-downloads/c Omponents, and then select Command Line Tools to be installed.

Xcode-select--install

Let's install an up to date gcc compiler:

Brew Install GCC

You'll also need to install [MacTeX]. This can is done with Homebrew, as seen below using the Homebrew Cask project, or by downloading and installing from the W Ebsite (http://www.tug.org/mactex/).

Brew Install Caskroom/cask/brew-caskbrew Cask install MacTeX

Now let's install the plotting software, gnuplot, and has it use native Qt graphics (instead of the older X11 Setup):

Brew Install Gnuplot--QT

Finally, let's install Octave (note All build issues has been fixed, as of 4th 2014):

Brew Tap Homebrew/sciencebrew Install octave

And tell Octave to use Qt graphics with Gnuplot when plotting:

echo "Setenv gnuterm qt;" >> ~/.octaverc

Now restart your Terminal and launch octave:

Octave

Also, to avoid have to constantly change directories after starting octave, the following script would load octave with T He Terminal ' s current working directory automatically set in octave. Let's set it up:

Echo ' #!/bin/bash ' >>/usr/local/bin/octecho ' octave-p "' pwd '" ' >>/usr/local/bin/octchmod +x/usr/local/ Bin/oct

And to start octave using the This script instead (for example if you are working in a project directory and want to load OC Tave with the directory already set):

Oct

Known issues:executing GNUPlot gives error message on Octave (v 3.4.0) with X11 installed on OS 10.6.8 (Snow Leopard). For Example:octave-3.4.0:10> hist (W) warning:broken pipe – some output may be lost "reason:incompatible Library ver Sion:libfontconfig.1.dylib requires version 14.0.0 or later, but Libfreetype.6.dylib provides version 13.0.0 "

Fix:open terminal window and type following 3 lines:cd/applications/gnuplot.app/contents/resources/lib MV Libfreetype.6 . dylib Libfreetype.6.dylib.bak ln-s/usr/x11/lib/libfreetype.6.dylib.

(Source and explanation:http://stackoverflow.com/questions/19932161/ INCOMPATIBLE-LIBRARY-VERSION-LIBFONTCONFIG-1-DYLIB-13-INSTEAD-OF-15)

LinuxUbuntuUbuntu Software Center

Just search for the GNU Octave in Ubuntu software Center and click Install. When the installation is finishes, you're ready for use Octave.

Command Line

If you prefer using the command line or if you have a Ubuntu based version of Linux that comes without Ubuntu software Ce Nter, you can install the Octave by typing the command on a terminal:

(default installation 3.8.1 version)

sudo apt-get install octave

If you get an error "E:package ' octave3.2 ' have no installation candidate", then follow these steps

sudo apt-add-repository-y ppa:mtmiller/octavesudo apt-get updatesudo apt-get Install octave
Red Hat/centosCommand Line

You can install Octave from the Yum repository using the following command lines:

sudo yum install epel-releasesudo yum Install octave
Browser (any OS)

It is possible to use Octave online, without installing it on local computer. Web interface have a code editor and REPL console with inline plots. It gives access to Octave 3.6.4.

url:http://octave.im/

Category:
    • ML

Scientific Computing Software--octave installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.