[FIX] run_matlab_cmd now working with MATLAB on Linux #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Matthias,
I tried to run your demo code but the MATLAB call failed in
mit.py
at lines 119-125, saying that it couldn't findextract_all_fixations
:The problem is that, when running MATLAB on Linux, the
cwd
argument often has no effect when running the MATLAB command via subprocess.check_call inutils.py
. This is because the startup folder of MATLAB on Linux is not always the directory from which you start it (see here for more information). So what most likely happened was that it started MATLAB from the temporary folder but it then used a different folder as a startup folder. And that folder did not contain theextract_all_fixations.m
file.I modified
run_matlab_cmd
so that MATLAB first cd's into the directory that contains the m file and then executes the desired function. The demo code now runs as expected.Cheers,
Michael