[Top][All Lists]

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

Re: Want to know how to inluce octave fft lib in my Qt program

From: Prasanth N P
Subject: Re: Want to know how to inluce octave fft lib in my Qt program
Date: Tue, 22 Oct 2013 14:55:17 +0530

On Tue, Oct 22, 2013 at 9:35 AM, c. <address@hidden> wrote:

On 22 Oct 2013, at 05:45, Prasanth N P <address@hidden> wrote:

> #include </usr/include/octave-3.2.4/octave/oct.h>
> #include </usr/include/octave-3.2.4/octave/octave.h>
> #include </usr/include/octave-3.2.4/octave/parse.h>

Octave 3.2 is __VERY__ __OLD__

Many things have changed since those days.
You are strongly recommended to update your Octave installation.

If you are using the "mkoctfile" [1] script to build your code,
you do not need to specify the full path of your header files
(which is very bad practice anyway). So change those lines to

> #include <octave/oct.h>
> #include <octave/octave.h>
> #include <octave/parse.h>

and use "mkoctfile" to compile and link.

> #include </usr/include/octave-3.2.4/octave/oct-fftw.h>

if you are using "fft" as an Octave command there is no need to include this latter header.

> string_vector argv (2);
>   argv(0) = "embedded";
>   argv(1) = "-q";

You constructed the string_vector argv, but never used it, so what do you think that should be there for?
Have you ever looked at this [2] example in the manual?

You need to initialize the Octave interpreter by invoking "octave_main" with the "embedded" flag set to true
before you can use "feval".



Yes, all them are corrected and feval issue solved. But still cant collect the  output to an array

 octave_value_list output = feval ("fft", input, 1);
 ColumnVector output_vector = output(0).column_vector_value ();

error: octave_base_value::array_value(): wrong type argument `complex matrix'

reply via email to

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