MATLAB Live Editor
Create scripts that combine code, output, and formatted text in an executable notebook.
Create an Executable Notebook
Use live scripts to tell a story. Enhance your code and output with formatting, images, and hyperlinks. Insert equations using the interactive editor or create them using LaTeX. Add interactive controls to set values in your script. You can then share your live scripts directly with colleagues, so they can reproduce or expand on your work. Publish your work as a PDF, HTML, or LaTeX document.
Try it: Can you calculate sunrise and sunset times for your location?
Explore Ideas Quickly
Work in a single environment and eliminate context switching with results and visualizations that appear right next to the code that produced them. Divide your script into manageable sections and run each independently. Use the fully integrated debugger to troubleshoot your code.
MATLAB helps you code with contextual hints for function arguments, file names, and more. You can use interactive tools to explore figures and tables in the output. Then get automatically generated code to reproduce your changes.
Try it: Can you find the type of weather event that occurs most often in the data?
Create Live Functions
The Live Editor is not just for scripts. You can also create functions, and document them with formatted text, images, hyperlinks, and equations.
Try it: Can you use the debugger to explore the execution of the
Teach with Live Scripts
Create engaging lectures that combine explanatory text, mathematical equations, code, and results. Step through topics one section at a time and modify your code on the fly to demonstrate concepts. Develop examples that illustrate how engineers use math to solve practical and complex problems. Create live scripts with MATLAB code to build assignments that let students explore and learn on their own.
Try it: Can you find the definite integral of sin2(x) cos2(x) for the interval [0, 2π]?
Get started today by reviewing the following examples.
- Using the Live Editor (4:35) (Video)
- Introduction to the Live Editor
- Use the Live Editor to Accelerate Exploratory Programming
- Create an Interactive Narrative with the Live Editor
- Teach with Live Scripts
- MATLAB Live Editor: A Scientific Computing Playground for Students (10:28) (Video)
Visit the MATLAB live script gallery for more community-authored examples.