In Matlab you can use AxtiveX-objects that return multiple values.
Here's an example code:
pkg load windows
excel = actxserver('Excel.Application');
workbook = excel.Workbooks.Open('E:\Temp\del\a.xlsx');
worksheet = workbook.Worksheets.Item(1);
range = worksheet.UsedRange;
[numRows, numColumns] = size(range.Value);
workbook.Close(false);
excel.Quit();
This also works in Octave.
BUT: The interface I use looks like this:
MyComObject.BeatArray(out EventTimes, BeatTypes, TemplateNumbers: OleVariant);
and each returned parameter is a double-array. It can be used in Matlab using
[a,b,c] = foo.BeatArray
That does not work in Octave. Is there a way to use that function in Octave?
Thanks!
Your question is actually 2 separate things.
The "COM" interface is available via the windows package.
Yes. As long as your function returns multiple outputs, then capturing multiple outputs works the same way in octave. Note that (like matlab), a single output consisting of multiple elements is not the same thing as multiple outputs.