Opening the book…
This section is optional.
MATLAB has a variation on m-files called a "Live Editor" file. The extension for this file is .mlx. This is not available in Octave.
When a .mlx live script is run, a 2nd column is opened showing the results of the calculations. These results get saved in the .mlx file.

In a regular .m file, you can include the results as comments. This can be done in both MATLAB and Octave.
An example of results in listed in comments:
This is a link to MATLAB help n live scripts: https://www.mathworks.com/help/matlab/matlab_prog/create-live-scripts.html
This page titled 2.2.1: .mlx Live Editor Files was last modified on Mon, 15 Jul 2024 01:28:26 GMT and is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Carey Smith.
The book could not be loaded just now.