Main Content

Variabili del workspace e file MAT

Gestire i dati nel workspace di MATLAB®

Il workspace contiene variabili create dall'utente o importate in MATLAB da file di dati o da altri programmi. È possibile visualizzare e modificare i contenuti del workspace nel browser del workspace o nella finestra di comando. Per maggiori informazioni, vedere Create and Edit Variables.

Le variabili del workspace non vengono conservate quando si esce da MATLAB. Per utilizzare i dati tra più sessioni, salvarli in un file compresso con estensione .mat, chiamato file MAT. È possibile ripristinare i dati salvati caricando un file MAT in MATLAB. Per maggiori informazioni, vedere Save and Load Workspace Variables.

Funzioni

loadLoad variables from file into workspace
saveSave variables from workspace to file
matfileAccess and change variables in MAT-file without loading file into memory
dispVisualizzare il valore della variabile
formattedDisplayTextCapture display output as string (Da R2021a)
whoList variables in workspace
whosList variables in workspace, with sizes and types
clearRemove items from workspace, freeing up system memory
clearvarsClear variables from memory
openvarOpen workspace variable in Variables editor or other graphical editing tool
workspaceOpen Workspace browser to manage workspace

Argomenti

Risoluzione dei problemi

Unexpected Results When Loading Variables Within a Function

If you have a function that loads data from a MAT-file and find that MATLAB does not return the expected results, check whether any variables in the MAT-file share the same name as a MATLAB function.

Informazioni complementari