Skip to content

Evaluating .m file taking string as input #15

@cgerlein

Description

@cgerlein

Hi,

I have been trying to use teh matlab_wrapper as an alternative to the Engine, which for some obscure reason, just stopped working on me recently and I just haven't been able to fix it. I'm trying to evaluate a function that takes one input: a filename. Here is what I'm doing:

import matlab_wrapper
matlab = matlab_wrapper.MatlabSession(matlab_root='/Applications/MATLAB_R2015a.app/')
matlab.put('filename','/Volumes/Cynthia_ExtHD_2TB/Scatterometer/Amazon/Amazon_Quickscat_SIR_Data/queh-a-Ama00-001-004.sir')
matlab.eval('loadsir')

At which point I get the following error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/matlab_wrapper/matlab_session.py", line 181, in eval
    raise RuntimeError("Error from MATLAB\n{0}".format(error_string))
RuntimeError: Error from MATLAB
MATLAB:minrhs: Not enough input arguments.
Error: in fuction loadsir in file /Users/cynthiagerlein/Dropbox (Personal)/Scatterometer/Matlab/loadsir.m line 143

My Matlab function definitely only takes one argument. Does it have something to do with the fact that it's a string...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions