[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessing ComplexMatrix values from octave_value_list
From: |
remigio |
Subject: |
Re: Accessing ComplexMatrix values from octave_value_list |
Date: |
Thu, 11 Jan 2018 07:59:49 -0700 (MST) |
Thanks Kai,
it is completely clear for me now, I provide a working minimal working
exemple in case it can be of use for somebody:
#include <octave/oct.h>
#include <octave/octave.h>
#include <cmath>
DEFUN_DLD (function1, args, nargout,"function1")
{
ComplexMatrix psi_int(2, 3);
return octave_value (psi_int);
}
///////////////////////////////////////////////////////////////////////////////////
#include <octave/oct.h>
#include <octave/octave.h>
#include <octave/parse.h>
#include <cmath>
DEFUN_DLD (function2, args, nargout, "function2")
{
octave_value_list out = feval("function1");
ComplexMatrix psi_int = out(0).complex_matrix_value();
return octave_value (psi_int);
}
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html