Documentation

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

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
commandhistoryOpen Command History window, or select it if already open
commandwindowOpen Command Window, or select it if already open
filebrowserOpen Current Folder browser, or select it if already open
workspaceOpen Workspace browser to manage workspace
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
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.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

Topics

Access and Modify Settings

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

Shell Escape Functions

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

Was this topic helpful?