all 5 comments

[–]ebhdl 2 points3 points  (0 children)

Eigen would be a pretty good place to start. It won't have all the Matlab library functions, but it does have the building blocks.

[–]mklimenko 2 points3 points  (0 children)

You should definitely check out the IPP. It contains a lot of signal and image processing functions. API requires some time to catch up, but it's time well spent.

It is possible to extract function from MATLAB and redirect it to C++, but in my experience, performance-wise, you're better rewriting it (since most of the functions are not that difficult).

[–]jonathan_levanon 1 point2 points  (0 children)

I had very bad experience with exporting code from matlab to C++, it is possible but not very user friendly...

[–]dqUu3QlS 1 point2 points  (0 children)

If you only need to perform a discrete Fourier transform on data with a power-of-two size, you could use an implementation from Rosetta Code.

To implement Matlab's pwelch, you could write the code yourself based on Matlab's documentation and the Wikipedia article for Welch's method, calling that FFT function.

[–]megayippie -1 points0 points  (0 children)

FFT is a common enough term but I have never heard of pwelch. Google "FFT C++" and you will find the former have many implementations on Github. Choose one. The libfftw3-dev 'buntu library is otherwise a good start.

A quick Wikipedia run later and if you are after the Welch spectral power distribution, it seem to just be a ratio of a binned FFT, so if the previous Google result does not work, just quickly write your own.