Enable Matlab notebook in IPython/Jupyter

It is possible to use Matlab instead of Python commands in a Jupyter notebook. The blog post how to use Matlab from ipython notebook describes how to enable this, using the Anaconda python distribution. If you already have python 3 on your system, you don’t need to install Anaconda. Instead, follow the following steps:

  virtualenv-3.4 -p python3.4 pyenv
  . pyenv/bin/activate
  pip install jupyter
  pip install numpy
  pip install zmq
  pip install pymatbridge
  pip install matlab_kernel
  echo "export MATLAB_EXECUTABLE=/Applications/MATLAB_R2016a.app/bin/matlab" >> ~/.bash_profile
  source ~/.bash_profile
  . pyenv/bin/activate
  python -m matlab_kernel install
  jupyter notebook

screen-shot-2016-10-09-at-11-52-23The last command will launch a notebook window in the browser. Go to New -> Notebooks Matlab, and a new notebook is opened where Matlab commands can be written and immediately evaluated and results printed or plotted.



Een gedachte over “Enable Matlab notebook in IPython/Jupyter

  1. Pingback: Matlab-based IPython notebooks – Anne Urai

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen.

WordPress.com logo

Je reageert onder je WordPress.com account. Log uit /  Bijwerken )

Google photo

Je reageert onder je Google account. Log uit /  Bijwerken )


Je reageert onder je Twitter account. Log uit /  Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit /  Bijwerken )

Verbinden met %s