System Commands

Interact programmatically with the operating system and the MATLAB® application

Functions

expand all

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
matlab.io.saveVariablesToScriptSave workspace variables to MATLAB script
getprefGet custom preference value
setprefSet custom preference value
addprefAdd custom preference
rmprefRemove custom preference
isprefDetermine if custom preference exists
matlab.addons.installedAddonsGet list of installed add-ons
matlab.addons.isAddonEnabledDetermine if add-on is enabled
matlab.addons.enableAddonEnable installed add-on
matlab.addons.disableAddonDisable installed add-on
matlab.addons.installInstall add-on
matlab.addons.uninstallUninstall add-on
settingsAccess the SettingsGroup root object
SettingSetting object
SettingsGroupGroup of settings and subgroup objects
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

Settings

expand all

matlab.colors SettingsMATLAB syntax highlighting color 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

Topics

Access and Modify Settings

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

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.

Related Information