Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

System Commands

Interact programmatically with the operating system and the MATLAB® application

Functions

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
getprefPreference
setprefSet preference
addprefAdd preference
rmprefRemove preference
isprefTest for existence of preference
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

Topics

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?