help-octave
[Top][All Lists]
Advanced

[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 15:47:32 +0530




On Tue, Oct 22, 2013 at 3:16 PM, c. <address@hidden> wrote:

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

>
>  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'

oh, right, that's because the output of fft is in general complex, so you should use a
ComplexColumnVector rather than a ColumnVector to collectthe output.

The elements of the outupt vector will be of class Complex which is just a typedef for std::complex.

HTH,
c.

Ok it work fine, but actually I just want the absolute value of those result. 



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



Is this the right method? How can I study these octave datatypes? Is any tutorial avialable for this octave c++ API? 


reply via email to

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