Live-Skripte und -Funktionen
Live-Skripte und Live-Funktionen sind Programmdateien, die für die Interaktion mit einer Reihe von MATLAB®-Befehlen sinnvoll sind. Live-Skripte beinhalten Ausgaben und Grafiken zusammen mit dem Code, mit dem diese erstellt wurden, in einer einzigen interaktiven Umgebung, dem sogenannten Live-Editor. Live-Funktionen gewährleisten zusätzliche Flexibilität und ermöglichen Ihnen, Eingabewerte zu übertragen und Ausgabewerte zurückzusenden. Sie können formatierten Text, Bilder, Hyperlinks und Gleichungen zu Live-Skripten und -Funktionen hinzufügen, um ein interaktives Narrativ zu erstellen, das mit anderen geteilt werden kann.
Weitere Informationen zu Live-Skripten und -Funktionen, einschließlich Inkompatibilitäten und Informationen über das Live-Code-Dateiformat, finden Sie unter What Is a Live Script or Function?.
Bereits in der MATLAB-Community existierende Live-Skripte entdecken Sie in der MATLAB-Live-Skript-Galerie.
Funktionen
export | Convert live script or function to standard format (Seit R2022a) |
Themen
- What Is a Live Script or Function?
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.
- Create and Run Sections in Code
Divide MATLAB code files into sections and run all sections or run each section individually. (Seit R2021b)
- Create Live Functions
Create live functions in the Live Editor with formatted text, images, and equations.
- Add Help for Live Functions
Add help text to live functions that displays when you use the
help
anddoc
functions. - Add Interactive Controls to a Live Script
Add sliders, spinners, drop-down lists, check boxes, edit fields, buttons, file browsers, and color pickers to live scripts to control variable values interactively.
- Add Interactive Tasks to a Live Script
Add tasks to live scripts to explore parameters interactively and generate code.
- Ways to Share and Export Live Scripts and Functions
Share live scripts and functions with other MATLAB users, or export them as PDF files, Microsoft® Word documents, HTML files, LaTeX files, Markdown files, or Jupyter® notebooks for viewing outside of MATLAB.
- Compare and Merge Live Scripts and Functions
View and merge changes between two live scripts or functions.
- Live Code File Format (.mlx)
The Live Code file format (
.mlx
) uses Open Packaging Conventions technology, which is an extension of the zip file format.