help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to use fft in c++


From: Carlo De Falco
Subject: Re: how to use fft in c++
Date: Thu, 8 Jun 2017 07:58:49 +0000

> On 7 Jun 2017, at 21:27, Progressive <address@hidden> wrote:
> 
> Hi,
> 
> I have a c++ file with octave embedded in it. Calculating via Matrices and
> so on works fine but I don't get it how do I use functions, e.q. the fft in
> c++ / upon variables from/in c++ ?
> 
> The documentation
> https://www.gnu.org/software/octave/doc/v4.0.1/Signal-Processing.html just
> tells fft(x).
> 
> Just briefly: I have an array in c++ and I want to apply fft on it. How do I
> do that?
> 
> Thank you very much!
> 

you could invoke the interpreter doing something like this (untested):

 ColumnVector x, y;
 octave_value_list in, out;

 in(0) = x;
 out = feval ("fft", in, 1);
 y = out(0).column_vector_value ();

but if you are looking for performance you are probably better off using fftw's 
API directly.

c.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]