[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: handling complex arrays in octfiles
From: |
Andy Adler |
Subject: |
Re: handling complex arrays in octfiles |
Date: |
Mon, 19 Apr 2004 19:50:04 -0400 (EDT) |
On Mon, 19 Apr 2004, Luke Sjulson wrote:
> I'm trying to write an oct-file to access a precompiled FFT function in
> octave 2.1.57 on linux. The function takes arguments of type
> doublecomplex, which is simply defined as:
>
> typedef struct
> {
> double real, imag;
> } doublecomplex;
>
> This is simple enough, but I can't figure out exactly how octave is
> storing complex numbers, or how to convert back and forth. Does anyone
> know how to do this? I apologize for this being a somewhat silly
> question, but my C++ skills are very poor.
For an example of a C interface to the octave C++ classes,
you may wish to look at the complex_sparse_ops.cc code
in octave-forge.
http://cvs.sourceforge.net/viewcvs.py/octave/octave-forge/main/sparse/complex_sparse_ops.cc
Andy
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------