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: c.
Subject: Re: Want to know how to inluce octave fft lib in my Qt program
Date: Thu, 24 Oct 2013 11:34:27 +0200

On 24 Oct 2013, at 11:05, Prasanth N P <address@hidden> wrote:
> 
>   for (ucI=0; ucI< 1024; ucI++)
>     fscanf(fp, "%d\n", input_vector.fortran_vec () + ucI);
> 

>   for (ucI=0; ucI< 1024; ucI++)
>       printf("%d\n",output_vector.fortran_vec () [ucI]);

This is not related to Octave API, you are reading and writing doubles 
formatting 
them as integers with "%d":

http://www.cplusplus.com/reference/cstdio/printf/

BTW, why are you using C-style IO rather than C++?

http://www.cplusplus.com/reference/istream/istream/operator%3E%3E/
http://www.cplusplus.com/reference/ostream/ostream/operator%3C%3C/

That is a matter of taste, but I find that iostream is usually much more 
convenient ...

c.

reply via email to

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