|
From: | Doug Stewart |
Subject: | Re: Want to know how to inluce octave fft lib in my Qt program |
Date: | Fri, 25 Oct 2013 07:34:02 -0400 |
On Thu, Oct 24, 2013 at 8:18 PM, c. <address@hidden> wrote:
It is OK if you want to stick to C-style IO but to do it correctly you have to use %g instead of %d.
On 24 Oct 2013, at 12:07, Prasanth N P <address@hidden> wrote:
> . I need the output as float or double.
the results you get are wrong because you input your data incorrectly.
c.But when I am checked, I cant figure out those. Can you please check this..My input is a file 'buffer' with 1024 number of samples. My octave program is.load 'buffer'setenv ("GNUTERM", "x11")l=1024;v=fft(buffer,l);V = abs(v);save output V;and my c++ interpreter program isfp = fopen("buffer","r");if (fp == NULL)return 0;for (ucI=0; ucI< 1024; ucI++)fscanf(fp, "%d\n", input_vector.fortran_vec () + ucI);fclose(fp);octave_value_list input;input(0) = input_vector;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 ();Whats wrong here? Can you please help me.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |