This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

System Commands

Interact programmatically with the operating system and the MATLAB® application


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 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
matlab.appdesignerApp Designer settings, including canvas editor and component browser settings
matlab.colors MATLAB syntax highlighting color settings
matlab.editorEditor settings, including language, backup, and display settings
matlab.fontsCode font settings
matlab.generalGeneral settings including matfile settings
matlab.keyboardKeyboard settings including suggestions and completions settings


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