[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to return a ComplexMatrix from an OCT-file-function?
From: |
Patrick Boettcher |
Subject: |
How to return a ComplexMatrix from an OCT-file-function? |
Date: |
Tue, 18 Oct 2016 18:19:44 +0200 |
Hi list,
I can successfully return integer and double matrices from a
function of an oct-file. However, ComplexMatrix-matrices seems to be
truncated to Matrix-matrices.
Here is what I get from the following code:
DEFUN_DLD(test, args, nargout,
"")
{
Matrix m = ComplexMatrix(8,8);
return octave_value(m);
}
calling
C2 = test()
results in
C2 =
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
Having ComplexMatrix's in args works via args(X).complex_matrix_value()
Do I need to return anything else than octave_value?
best regards,
--
Patrick.
- How to return a ComplexMatrix from an OCT-file-function?,
Patrick Boettcher <=