octave-daemon
octave-daemon copied to clipboard
Octave structures
Hi Gutza,
Is there an example around handling structures returned from Octave?
for example,
function x = fn() x.a = 1; x.b = [1, 2; 3, 4]; x.c = "string"; endfunction
thanks
http://projects.moongate.ro/octave-daemon/octave-daemon/tutorial_quickstart.pkg.html#quickstart.qs_other
the following does two round trips to get an array value. am still struggling to understand how getMatrix() works. It just returned a string to me.
the result below is an array that returns (just an example) inputs and outputs [22, 33, 55]
self::$octave->run("result=sum_numbers(22,33)");
$i = self::$octave->query("result{1,3}");
is there a more efficient way to do the same using getMatrix?