Script live e funzioni
Gli script live e le funzioni live sono file di programma utili per interagire con una serie di comandi di MATLAB®. Gli script live contengono output e grafica con il codice che li ha prodotti, insieme in un unico ambiente interattivo chiamato Live Editor. Le funzioni live offrono un'ulteriore flessibilità, consentendo di passare valori di input e restituire valori di output. È possibile aggiungere testo formattato, immagini, collegamenti ipertestuali ed equazioni agli script e alle funzioni live per produrre una narrazione interattiva che può essere condivisa con altri.
Per ulteriori informazioni sugli script e le funzioni live, comprese le incompatibilità e le informazioni sul formato dei file di Live Code, vedere What Is a Live Script or Function?
Per esplorare gli script live esistenti della comunità di MATLAB, vedere MATLAB Live Script Gallery (Galleria degli script live).
Funzioni
export | Convert live script or function to standard format (Da R2022a) |
Argomenti
- Create Live Scripts in the Live Editor
Create live scripts in the Live Editor with formatted text, images, and equations, and view the generated output and graphics with the code that produced it.
- Create and Run Sections in Code
Divide MATLAB code files into sections and run all sections or run each section individually. (Da 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, color pickers, and date 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.
- Editor/Debugger Preferences
Use Editor/Debugger preferences to customize the Editor.