Here is the code I am running on each side:
>>> m1 = matlab.engine.start_matlab()
>>> testpath = 'Path/to/file/containing-testfunc.m'
*lots of path gibberish*
Traceback (most recent call last):
File "<input>", line 1, in <module>
, line 79, in __call__
, line 107, in result
self._future,self._nargout, None, out=self._out, err=self._err)
MatlabExecutionError: Too many output arguments.
I have double checked the path to testfunc.m, and I suspect that Matlab is able to find it because otherwise it would say it could not find it.
Here are the contents of testfunc.m:
function  = testfunc()
a = 2
As indicated by the name, this function is only a test because I found this error using a more complicated function. I created the testfunc() just to try to narrow down the reasons for which I might be getting this error. I am able to run testfunc() (and my more complicated function) from the Matlab gui if I use
This leads me to believe there is an issue with the Matlab engine or the way I am using it.
It might be important to point out that built in Matlab functions seem to be working fine in the engine for example:
m1.workspace['testvar'] = 10
I am only having trouble using functions that I include myself.
Any help would be greatly appreciated.