没有项目描述
matlab-kernel的Python项目详细描述
安装
安装时使用:
$ pip install matlab_kernel
或者pip install git+https://github.com/Calysto/matlab_kernel用于开发版本。
要使用内核,请运行以下命令之一:
$ jupyter notebook # In the notebook interface, select Matlab from the 'New' menu $ jupyter qtconsole --kernel matlab $ jupyter console --kernel matlab
从内核列表中删除:
$ jupyter kernelspec remove matlab
配置
内核可以通过将matlab_kernel_config.py文件添加到 jupyter配置路径。MatlabKernel类提供plot_settings作为可配置特征。 可用的打印设置有: “格式”、“后端”、“宽度”、“高度”和“分辨率”
cat ~/.jupyter/matlab_kernel_config.py c.MatlabKernel.plot_settings = dict(format='svg')
故障排除
启动时内核超时
如果内核没有启动,请尝试从终端运行以下命令
如果打开问题,请包括该输出。
内核未列出
如果内核未列为可用内核,请首先尝试以下命令:
python -m matlab_kernel install --user
如果仍然没有列出内核,请验证以下内容是否指向 python版本:
which python # use "where" if using cmd.exe
which jupyter
其他信息
Matlab内核基于MetaKernel, 这意味着它有一套标准的魔法关于魔法的完整列表, 在单元格中运行%lsmagic
提供了一个示例笔记本online
关于密谋的笔记。每次调用Matlab之后,我们都要求Matlab保存 打开图形到图像文件,其格式和分辨率是使用 %plot魔法生成的图像在笔记本中以内联方式显示。你可以 使用%plot native来提升正常的Matlab窗口。
高级安装说明
在安装python包时,我们会自动安装jupyter kernelspec。可以使用jupyter kernelspec list找到此位置如果不需要默认位置,可以删除倍频程内核的目录,然后使用python -m matlab_kernel install进行安装。有关可用选项,请参见python -m matlab_kernel install --help。
据报道,Matlab2016B版运行良好但是,matlab 2014b不能与python 3.5一起工作。