Matlab equivalent to iPython Notebook
356 views (last 30 days)
David Garrison on 16 Sep 2019
MATLAB has the Live Editor which allows you to create live scripts that combine code, output, and formatted text in an executable notebook. Code can be divided into manageable sections that can be run independently. Output and visualizations appear next to the code that produced them. Code and results can be enhanced with formatted text, headings, images, and hyperlinks. Equations can be added using the interactive editor or created using LaTeX. Live scripts can be exported to HTML, PDF, LaTeX, or Word.
Live scripts can contain interactive controls to allow others to experiment with parameters in your code. You can choose to hide the code to create simple applications and dashboards that can be shared with others.
The Live Editor provides contextual hints for function arguments, file names, and more. Figures and tables in the output are interactive. Those interactions generate MATLAB code automatically. That code can then be added back to your live script. Refactoring tools allow you to select blocks of code to create reusable functions. The Live Editor provides a fully integrated debugger to troubleshoot code.
In R2019b, we've added Live Editor Tasks which are apps that can be embedded in a script that allow you to interactively explore parameters and options, immediately see the results, and automatically generate the corresponding MATLAB code for the completed task and for the display of results.
More Answers (5)
Anne Urai on 12 Nov 2015
Personally, I do not think Matlab's Publish function has the same advantages as the IPython notebook. However, it is quite easy to run Matlab code within an IPython notebook. See my instruction guide here http://anneurai.net/2015/11/12/matlab-based-ipython-notebooks/
Sarah Palfreyman on 20 Apr 2016
Angel marchev on 30 Dec 2019
Still, as of today Matlab is lagging behind compared to R and Python for scientific computing and IMHO it si because of poor (to none) integration in Jupyter.... everyone in the world is using notebooks, and mathworks should not be going against its own (shrinking in number) users
David Garrison on 20 Dec 2019
Royi and Anne,
Thank you for your comments. For those people out there who use Jupyter and MATLAB, the MATLAB kernel for Jupyter may be their preferred approach. One thing Jupyter has demonstrated is the power of the notebook paradigm. We built the Live Editor for MATLAB users to create notebooks for sharing, demonstraton, and teaching. We can give our users some things that Jupyter with the MATLAB kernel cannot provide including embedded UI controls, live editor tasks, and code generation from plot interactions. What's more, we can give Live Editor users a much tighter integration with the larger MATLAB ecosystem with tools like code completion, file comparison, command line execution and more.
Royi Avital on 20 Dec 2019
Edited: Royi Avital on 13 Jan 2020
As written above, there is the option of MATLAB's Live Editor.
I find it to be really limited vs. iPython Notebook. They are not even close in their LaTeX capabilities and the quality of the experience in my opinion.
The nice thing about the iPython Notebook (More accurately, Jupyter Framework) framework is it is open.
So there are Open Source solutions which implements MATLAB Kernel which gives you the ability to use MATLAB just as you would use Python / R / Julia. Have a look at:
Each of them works perfectly.