views:

462

answers:

4

Does anyone know a resource where we can obtain FREE C++ libraries for MATLAB functions? For example, linear algebra problems can be solved using LAPACK and BLAS.

Also, MATLAB in a .NET project is out of the question - I'm talking about direct C++ implementations of popular MATLAB functions (I don't know which functions I need in C++ yet but the functions used are not going to be esoteric).

Any suggestions about such resources?

+7  A: 

I've never heard of a comprehensive port of matlab functionality to C++. That being said, almost everything matlab does exists within a C/C++ library somewhere, some off the top of my head:

  • LAPACK, BLAS, you already mentioned these, and there are a few good implementations, the most notable (free) one being ATLAS.
  • FFT is implemented in matlab via the fftw library
  • There are loads of fast open-source image libraries out there, ie. interpolation, filtering.
  • There are really good OOP matrix libraries out there, boost has a nice one.

After that, well figure out what you need and there is a good chance someone has implemented it in C/C++.

DeusAduro
+1 for boost matrix. Do you have any interpolation packages which can perform functions similar to griddata?
Jacob
http://www.scimath.com/ has some pretty good functionality, not specifically griddata, but with 3-d interpolation you can impl griddata functionality fairly easily.
DeusAduro
+2  A: 

I also like

  • Armadillo (templated C++ library)
  • Eigen (another templated C++ library)
  • Newmat (an older but well-tested C++ matrix library)

Beyond that, your original question isn't really specific enough for better pointers.

Dirk Eddelbuettel
+2  A: 

Beyond the good suggestions already given, you may also be able to lift the code you need from the source code of Octave or Scilab. Both of these have GPL-style licenses, though, which may not suit your needs.

Martin B
A: 

Hi

Read your Matlab documentation very carefully and have a poke around the DLLs and other components it installs on your hard disks. I think you'll find that Matlab uses a version of BLAS for what BLAS does, possibly also LAPACK and others.

Regards

Mark

High Performance Mark