6

I wrote a research project in matlab that uses quite a few functions which I do not want to re-implement in C++, so I'm looking for libraries to handle these for me. The functions I need are: (by order of importance)

  1. Hilbert transform
  2. Matrix functions(determinant, inverse, multiplication...)
  3. Finding roots of polynomials(for degrees greater than 5)
  4. FFT
  5. Convolutions
  6. correlation(xcorr in matlab)
5
  • Have you tried looking for any of these yourself yet? What did you find? Commented Mar 15, 2012 at 15:13
  • These are all standard numeric routines, Google should overwhelm you with implementations, open-source, commercial and everything in-between. As @Li-aung Yip asks -- what did you find ? Commented Mar 15, 2012 at 15:20
  • Numerical Recipes in C probably contains most of what you want... Commented Mar 15, 2012 at 15:22
  • Well I found FFTW to do FFT and inverse-FFT, I found an easy way to use that for Hilbert transforms, Armadillo for linear algebra, and the GNU Scientific Library that does pretty much everything under the sun. I would still love to hear what others use.
    – Afiefh
    Commented Mar 15, 2012 at 20:00
  • Consider asking on scicomp.stackexchange.com .
    – dranxo
    Commented Mar 20, 2012 at 8:04

3 Answers 3

4

I don't know about most of those, but FFTW is the 'fastest Fourier transform in the West'. It is used in the MATLAB implementation of fft().

2

Once you've got an FFT you can knock off everything save for numbers 2. and 3.

The linear algebra requirement can be met with PETSc www.mcs.anl.gov/petsc/ which supports fftw.

I don't know how you're going to go about the root finding. You'll probably have to code that yourself (bisection, Newton's method etc etc.) but it's the easiest thing on the list to implement by far.

1

I am not sure about the libraries that are available for use, but if you already have the functions written in matlab there is another option.

If you compile the matlab functions to a dll they can be called by a c++ program. This would allow you to access the matlab functions that you already have without rewriting.

Not the answer you're looking for? Browse other questions tagged or ask your own question.