I am trying to run matlab script, on python jupyter notebook, using matlab python engine, thus I have three files:
- matlab script.m
- python wraper.py
- jupyter notebook.ipynb
I can run it properly when I put all the tree files in the same folder, but what I want to do is run the jupyter notebook with this folder structure:
├── matlab
│ ├── matlabfunction.m # 1
│ └── pythonwraper.py # 2
├── jupyternotebook.ipynb # 3
However, when I use the structure above, I get this error:
matlab.engine.MatlabExecutionError: Undefined function 'matlabfunction' for input arguments of type 'char'.
Please note that I call the matlab script inside pythonwraper.py like this:
import matlab
import matlab.engine
m_eng = matlab.engine.start_matlab()
m_eng.matlabfunction(some_parameters)
I would like to know what is the cause of the error and how can I fix it?