0

I am trying to use a toolbox which makes use of the Matlab's eigs() function. When I run this in Octave (3.6.4, installed via Homebrew on Mac OS X), the following is returned:

error: eigs: not available in this version of Octave

I have found a lot op potential solutions, about getting the ARPACK(-ng) program to work with Octave. I have tried more methods then I can remember, but none seemed to work.

Does anybody know the current status of Octave using the eigs() function? Is this possible, preferably by using packages in Homebrew?

Thanks.

Roemer
  • 3,566
  • 1
  • 16
  • 32

1 Answers1

1

I think you're referring to the fact that as of 3.6, Octave no longer comes with eigs, and depends on an external arpack library. From the Octave release notes:

Summary of important user-visible changes for version 3.6:
---------------------------------------------------------
...
 ** The ARPACK library is no longer distributed with Octave.
    If you need the eigs or svds functions you must provide an
    external ARPACK through a package manager or by compiling it
    yourself.  If a pre-compiled package does not exist for your system,
    you can find the current ARPACK sources at
    http://forge.scilab.org/index.php/p/arpack-ng

So you'll need an arpack library installed before installing Octave, somewhere visible to Octave. For homebrew, that means under /usr/local/.

Octave's configure file has arpack detection logic, and looks like it will detect arpack during the build process by default, and build against it if present. So Homebrew's octave should pick it up if you have it installed, even without special support for it in the formula.

There's no arpack formula in the current homebrew-science version, but there is an open pull request to add one: https://github.com/Homebrew/homebrew-science/pull/112. Go over there and comment to show support and maybe it'll get merged in soon. Once that's in, do brew install libarpack; brew install octave and your Octave may well pick up eigs. If it doesn't, then put in an issue against homebrew-science to add arpack support.

Andrew Janke
  • 23,508
  • 5
  • 56
  • 85