help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing ComplexMatrix values from octave_value_list


From: Andreas Weber
Subject: Re: Accessing ComplexMatrix values from octave_value_list
Date: Thu, 11 Jan 2018 09:21:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

Am 11.01.2018 um 08:59 schrieb remigio:
> octave_value_list out = feval("interpolate_complex_modes", argin);
> ComplexMatrix psi_int = out(0).complex_matrix_value();
> 
> and when I run the code I get the error:
> 
> error: octave_base_value::complex_matrix_value(): wrong type argument
> 'cs-list'

What is the signature of interpolate_complex_modes? From the error
message I guess it returns more than one value, something like
[foo, bar] = interpolate_complex_mode(...) ?

> In the function  "interpolate_complex_modes" (tested separately which works)
> the output is of type
> ComplexMatrix and is returned the following way:
> 
> ComplexMatrix  psi_int(psi_dims(1), psi_dims(2));
> 
> octave_value_list retval;
> retval(0) = octave_value(psi_int);
> return octave_value (retval);

So interpolate_complex_modes is not a .m file but in an .oct file?
and you should return a octave_value_list, you can use here

return ovl (psi_int(psi_dims(1), psi_dims(2)));

-- Andy



reply via email to

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