• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Calysto/matlab_kernel: Jupyter Kernel for Matlab

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Calysto/matlab_kernel

开源软件地址(OpenSource Url):

https://github.com/Calysto/matlab_kernel

开源编程语言(OpenSource Language):

Jupyter Notebook 72.9%

开源软件介绍(OpenSource Introduction):

A Matlab kernel for Jupyter

Prerequisites

Install Jupyter Notebook and the Matlab engine for Python.

Installation

Install using:

$ pip install matlab_kernel

or pip install git+https://github.com/Calysto/matlab_kernel for the dev version.

To use the kernel, run one of:

$ jupyter notebook
# In the notebook interface, select Matlab from the 'New' menu
$ jupyter qtconsole --kernel matlab
$ jupyter console --kernel matlab

To remove from kernel listings:

$ jupyter kernelspec remove matlab

Configuration

The kernel can be configured by adding an matlab_kernel_config.py file to the jupyter config path. The MatlabKernel class offers plot_settings as a configurable traits. The available plot settings are: 'format', 'backend', 'width', 'height', and 'resolution'.

cat ~/.jupyter/matlab_kernel_config.py
c.MatlabKernel.plot_settings = dict(format='svg')

Troubleshooting

Kernel Times Out While Starting

If the kernel is not starting, try running the following from a terminal.

python -m matlab_kernel.check

Please include that output if opening an issue.

Kernel is Not Listed

If the kernel is not listed as an available kernel, first try the following command:

python -m matlab_kernel install --user

If the kernel is still not listed, verify that the following point to the same version of python:

which python  # use "where" if using cmd.exe
which jupyter

Additional information

The Matlab kernel is based on MetaKernel, which means it features a standard set of magics. For a full list of magics, run %lsmagic in a cell.

A sample notebook is available online.

A note about plotting. After each call to Matlab, we ask Matlab to save any open figures to image files whose format and resolution are defined using the %plot magic. The resulting image is shown inline in the notebook. You can use %plot native to raise normal Matlab windows instead.

Advanced Installation Notes

We automatically install a Jupyter kernelspec when installing the python package. This location can be found using jupyter kernelspec list. If the default location is not desired, you can remove the directory for the octave kernel, and install using python -m matlab_kernel install. See python -m matlab_kernel install --help for available options.

It has been reported that Matlab version 2016b works fine. However, Matlab 2014b does not work with Python 3.5.

Development

Install the package locally:

$ pip install -e .
$ python -m matlab_kernel install

As you make changes, test them in a notebook (restart the kernel between changes).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap