[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
real/imag part of ComplexMatrix in liboctave
From: |
Maurice Janssen |
Subject: |
real/imag part of ComplexMatrix in liboctave |
Date: |
Mon, 5 Feb 2001 22:21:55 +0100 |
User-agent: |
Mutt/1.2i |
Hello,
First of all, let me say that I now virtually nothing about C++, so my
question is probably covered in the docs or sources, I just can't find
it.
I have to do some numerical computations in C (using the GMP library),
but I'd like to call the functions from Octave, so I am using liboctave
as a wrapper.
The code for the computations returns two matrices, one for the
real part and one for the imaginary part. I want to return a single
ComplexMatrix to Octave, but I can't figure out how to assign the data
to a ComplexMatrix.
Something like:
ComplexMatrix CM;
Matrix Mr, Mi;
/* some C-code */
CM.real=Mr;
CM.imag=Mi;
Can you please tell me how I can accomplish this?
Thank you very much in advance,
Maurice
--
Maurice Janssen .~. The best way to accelerate
/ v \ a computer running Windows
address@hidden /( )\ is at 9.8 m/s^2
^-^
-------------------------------------------------------------
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
-------------------------------------------------------------
- real/imag part of ComplexMatrix in liboctave,
Maurice Janssen <=