MATLAB Live Editor
创建脚本组合代码,output, and formatted text in an executable notebook.
创建一个可执行笔记本
创建组合代码,输出和格式化文本的脚本。将代码划分为可单独运行的可管理部分。查看生成的代码旁边的输出和可视化。使用格式化文本,标题,图像和超链接增强您的代码和结果。使用交互式编辑器插入方程或使用LaTex创建它们。在单个可执行文件中保存代码,结果和格式化文本。
您可以在Matlab中使用Live Editor®和在MATLAB 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 Online和MATLAB Drive™.
Try it:您可以计算您所在地的日出和日落时间吗?
Get to Your Results More Quickly
MATLAB helps you code 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 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π]?
Learn More
Get started today by reviewing the following videos and examples.
- 什么是现场编辑?(2:20)(视频)
- Using the Live Editor(4:35)(视频)
- Interactive Control Design Using Live Editor Tasks(4:56)(视频)
- 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.