The MATLAB Live Editor was introduced about a year ago providing an elegant way to create, edit and run MATLAB code. Using the new editor the results of a MATLAB script are displayed together with the code that produced them. A Live Script can include equations, images, hyperlinks and formatted text, to be shared with others as an interactive document, as the webpage of MathWorks suggests.
When I worked on the interactive version of MRES, I thought about creating a book in which you can run MATLAB code. The idea was, as an example, that you can change the cutoff frequency and the order of a Butterworth in Chapter 6 and see how the changes affect the filter output. At this time MATLAB cloud services such as MATLAB Online, MATLAB Mobile etc. already existed and I have had numerous phone calls and emails with its developers. Unfortunately nobody at MathWorks told me about the upcoming release of the Live Editor, which would have made the development of the interactive book much easier. When it was introduced, about a year after the fourth edition of MRES appeared in the bookshelfs, they called me and asked me about my thoughts on the live editor.
I think the Live Editor is a really useful extension to the classic editor, but it’s a good thing that the classic editor (with publishing feature) still exists. The Live Editor has a number of weaknesses that make daily work difficult (often under time pressure). Here I do not consider the limited possibilities of the formatting of texts as a disadvantage. As one of the developers on the phone explained quite correctly, the Live Editor should not be an alternative to a word processing program. Due to the possibility to integrate LaTeX code, even within paragraphs, one can also write complex mathematical texts.
I have written a lot of Live Scripts and find that the integration of graphics works only to a limited extent. In particular, the use of commands such as figure and axes in the creation of publishable graphics is difficult. In addition, at least in the macOS version the zoom-in and zoom-out function is missing, obviously available for the Windows version of the editor. This is particularly unfortunate because uncontrolled zooming occurs when using the trackpad of Macbook Pros or the Mighty Mouse together with the command key.
The Live Editor should also be extended by the possibility to protect writing rights for text and code with a password. This would be the possibility to actually create an interactive book that allows the reader to change only certain parameters in the code, but not the descriptive text. Again using the Butterworth as an example, the reader should be able to change the cutoff frequency and the order of the filter, but not the function name butter.
In fact I am a great fan of the new live editor. Shortly after the release of the new editor with R2016a, I asked a Bachelor student to write his thesis completely in the Live Editor, which was really successful. Minor weaknesses in the graphic representations and formatting of the text were not taken into account when evaluating the work.
Download an example of a Live Script.