Contenuto principale

Comandi di sistema

Interagire in modo programmatico con il sistema operativo e l'ambiente MATLAB®

I comandi di sistema forniscono un accesso programmatico al sistema operativo e all'ambiente MATLAB. Utilizzando questi comandi, è possibile accedere alle informazioni sul computer, copiare il contenuto negli appunti del sistema, ottenere e impostare le variabili dell'ambiente ed eseguire i comandi del sistema operativo. Utilizzare le impostazioni per accedere e modificare le opzioni degli strumenti in MATLAB, come la finestra di comando, l'Editor o l'App Designer. Creare delle impostazioni personalizzate per memorizzare e accedere ai dati in tutte le sessioni di MATLAB.

Funzioni

espandi tutto

clipboardCopy and paste text to and from system clipboard
computerInformation about computer on which MATLAB is running
systemExecute operating system command and return output
cmdsepCommand separator for current platform (Da R2023b)
dosExecute DOS command and return output
unixExecute UNIX command and return output
getenvGet environment variable
loadenvLoad environment variables from .env and plain text files (Da R2023a)
isenvDetermine if environment variable exists (Da R2022b)
setenvSet environment variable
unsetenvRemove environment variable (Da R2022b)
perlCall Perl script using operating system executable
winqueryregItem from Windows registry
matlabProcessIDProcess identifier for MATLAB code execution process (Da R2025a)
matlab.io.saveVariablesToScriptSave workspace variables to MATLAB script
getprefGet custom setting value
setprefSet custom setting value
addprefAdd custom setting
rmprefRemove custom preference
isprefDetermine if custom setting exists
settingsAccess the SettingsGroup root object
clearTemporaryValueClear temporary value for setting
clearPersonalValueClear personal value for setting
clearInstallationValueClear installation value for setting (Da R2022a)
hasActiveValueDetermine whether setting has active value set (Da R2024a)
hasTemporaryValueDetermine whether setting has temporary value set
hasPersonalValueDetermine whether setting has personal value set
hasInstallationValue Determine whether setting has installation value set (Da R2022a)
hasFactoryValueDetermine whether setting has factory value set
addSettingAdd new setting
addGroupAdd new settings group
hasGroupDetermine if settings group exists
hasSettingDetermine if setting exists in settings group
removeGroupRemove settings group
removeSettingRemove setting
SettingRepresents individual setting
SettingsGroupGroup of settings and subgroup objects
matlab.settings.mustBeLogicalScalarValidate that setting value is a logical scalar
matlab.settings.mustBeNumericScalarValidate that setting value is a numeric scalar
matlab.settings.mustBeStringScalarValidate that setting value is a string scalar
matlab.settings.mustBeIntegerScalarValidate that setting value is an integer scalar

Impostazioni

espandi tutto

matlab.codeanalyzer SettingsCode analyzer settings
matlab.colors SettingsMATLAB syntax highlighting color settings for light theme
matlab.commandwindow SettingsCommand Window settings including text display settings
matlab.fonts SettingsCode font settings
matlab.general SettingsGeneral settings including MAT-file and random number settings
matlab.keyboard SettingsKeyboard settings including suggestions and completions settings
matlab.editor SettingsEditor settings, including language, backup, and display settings
matlab.appdesigner SettingsApp Designer settings, including canvas editor and component browser settings

Argomenti

Informazioni complementari