arokem / python-matlab-bridge

A simple Python => MATLAB(R) interface and a matlab_magic for ipython
BSD 2-Clause "Simplified" License
332 stars 97 forks source link

Unable to add folder using `addpath` #243

Closed fbrundu closed 7 years ago

fbrundu commented 7 years ago

Hi, I am unable to add a folder using addpath function via pymatbridge. I tried using directly Matlab and it works.

A minimal working example:

import pymatbridge as pymat

mlab = pymat.Matlab()
mlab.start()
mlab.run_code("addpath(genpath('directory'))")
mlab.stop()

I am on Mac OS X El Capitan - 10.11.6 (15G31) Matlab version: R2015a Python version: 3.5.2 Pymatbridge version: 0.5.2

Thanks, Francesco

fbrundu commented 7 years ago

I will close this issue, because I noticed that the error was due to the fact I was passing an invalid path to Matlab. It failed silently so I had not the opportunity to understand the problem was the path.

Thanks