MATLAB Live Editor
创建脚本组合代码,输出,和形式atted text in an executable notebook.
Create an Executable Notebook
创建脚本组合代码,输出,和形式atted text. Divide code into manageable sections that can be run independently. View output and visualizations next to the code that produced them. Enhance your code and results with formatted text, headings, images, and hyperlinks. Insert equations using the interactive editor or create them using LaTeX. Save code, results, and formatted text in a single executable document.
You can use the Live Editor in MATLAB®and inMATLAB Online™.
Try it:Can you find the exoplanet furthest from the earth?
Share Your Work
Add interactive controls to allow others to experiment with parameters in your code. Hide your code to create simple applications and dashboards. Publish live scripts as HTML, PDF, LaTeX, or Microsoft Word. Create documentation for live functions with formatted text, images, hyperlinks, and equations. Share your work throughMATLAB OnlineandMATLAB Drive™.
Try it:Can you calculate sunrise and sunset times for your location?
Get to Your Results More Quickly
MATLAB代码可以帮助您with contextual hints for function arguments, file names, and more. Use interactive tools to explore figures and tables in the output. Then get automatically generated code to reproduce your changes. Select blocks of code to create reusable functions. Use the fully integrated debugger to troubleshoot your code.
Try it:Can you find the type of weather event that occurs most often in the data?
Complete Steps Interactively
Use Tasks in the Live Editor to complete steps in your analysis. Interactively explore parameters and options and immediately see the results. Generate code in the script for the completed task and preview. Save a Live Editor Task as part of the live script for sharing or subsequent use.
Try it:Can you calculate the heart rate from the ECG signal?
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 thatlet 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π]?
Learn More
Get started today by reviewing the following videos and examples.
- What Is the Live Editor?(2:20)(Video)
- Using the Live Editor(4:35)(Video)
- Interactive Control Design Using Live Editor Tasks(4:56)(Video)
- Documentation: Live Scripts and Functions
- Documentation: Live Script Examples
- Live Scripts from File Exchange
Visit theMATLAB live script galleryto open and run community-authored examples.