I feel it would be valuable to provide some advice for installation and use for those unfamiliar with the matlab in linux, and the matlab.engine which is used to call matlab from python.
Using MATLAB in Ubuntu (after installation and activation):
create a symbolic link to open MATLAB via command 'matlab' from any terminal
my installation directory for MATLAB R2018b was: '/usr/local/MATLAB/R2018b'
add MATLAB bin folder containing executable script to PATH, choose one of the following:
1) export PATH="/usr/local/MATLAB/R2018b/bin:$PATH"
restart terminal OR source ~/.bashrc
2) sudo gedit ~/.bashrc
(append) export PATH="/usr/local/MATLAB/R2018b/bin:$PATH"
restart terminal OR source ~/.bashrc
I feel it would be valuable to provide some advice for installation and use for those unfamiliar with the matlab in linux, and the matlab.engine which is used to call matlab from python.
Using MATLAB in Ubuntu (after installation and activation):
export PATH="/usr/local/MATLAB/R2018b/bin:$PATH"
restart terminal ORsource ~/.bashrc
2)sudo gedit ~/.bashrc
(append)export PATH="/usr/local/MATLAB/R2018b/bin:$PATH"
restart terminal ORsource ~/.bashrc
Installing MATLAB Engine API for Python https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html
This may fail (permission problems, but then using sudo fails to properly install it too):
This worked for me (Ubuntu 16.04 LTS, Python 2.7, 3.5, 3.6, Anaconda 4.3): https://stackoverflow.com/questions/45016671/import-error-no-module-named-matlab-engine
Test matlab.engine via commands (output: True): https://www.youtube.com/watch?v=yhnB7zWgi_Q