Main Content

System Commands

Interact programmatically with the operating system and the MATLAB® application


développer tout

clipboardCopy and paste text to and from system clipboard
computerInformation about computer on which MATLAB is running
systemExecute operating system command and return output
dosExecute DOS command and return output
unixExecute UNIX command and return output
getenvEnvironment variable
setenvSet environment variable
perlCall Perl script using operating system executable
winqueryregItem from Windows registry workspace variables to MATLAB script
getprefGet custom preference value
setprefSet custom preference value
addprefAdd custom preference
rmprefRemove custom preference
isprefDetermine if custom preference exists
settingsAccess the SettingsGroup root object
clearTemporaryValueClear the temporary value for a setting
clearPersonalValueClear the personal value for a setting
hasTemporaryValueDetermine whether the setting has a temporary value set
hasPersonalValueDetermine whether the setting has a personal value set
hasFactoryValueDetermine whether the setting has a 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
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
SettingSetting object
SettingsGroupGroup of settings and subgroup objects


développer tout

matlab.codeanalyzer SettingsCode analyzer settings
matlab.colors SettingsMATLAB syntax highlighting color settings
matlab.commandwindow SettingsCommand Window settings including text display settings
matlab.fonts SettingsCode font settings
matlab.general SettingsGeneral settings including matfile 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


Access and Modify Settings

Access and modify options for tools such as fonts and colors using settings.

Create Custom Settings

Create custom settings to programmatically store and access data across sessions.

Shell Escape Function Example

Call external programs by issuing operating system commands.

Run External Commands, Scripts, and Programs

Use the ! character to call an operating system command. Run UNIX programs off the system path.

Change Environment Variable for Shell Command

This example shows how to substitute a user-specified value for an environment variable value set by MATLAB when you call a function using the system command.

Informations connexes