Live scripts and live functions are program files useful for interacting with a series of MATLAB® commands. Live scripts contain output and graphics with the code that produced them, together in a single interactive environment called the Live Editor. Live functions provide additional flexibility, allowing you to pass input values and return output values. You can add formatted text, images, hyperlinks, and equations to live scripts and functions to produce an interactive narrative that can be shared with others.
For more information about live scripts and functions, including incompatibilities and information about the Live Code file format, see What Is a Live Script or Function?.
To explore existing live scripts from the MATLAB community, see the MATLAB Live Script Gallery.
MATLAB live scripts and live functions are interactive documents that combine MATLAB code with embedded output, formatted text, equations, and images in a single environment called the Live Editor.
Divide MATLAB code files into sections and run all sections or run each section individually.
Create live functions in the Live Editor with formatted text, images, and equations.
Add help text to live functions that displays when you use the
Add sliders, drop-downs, check boxes, edit fields, and buttons to live scripts to control variable values interactively.
Add tasks to live scripts to explore parameters interactively and generate code.
Share live scripts and functions with other MATLAB users, or as static PDF, Microsoft® Word, HTML, and LaTeX documents for viewing outside of MATLAB.
View and merge changes between two live scripts or functions.
The Live Code file format (
.mlx) uses Open Packaging
Conventions technology, which is an extension of the zip file format.