Documentation

This is machine translation

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

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

System Commands

Interact programmatically with the operating system and the MATLAB® application

Functions

clipboard Copy and paste text to and from system clipboard
computer Information about computer on which MATLAB software is running
system Execute operating system command and return output
dos Execute DOS command and return output
unix Execute UNIX command and return output
getenv Environment variable
setenv Set environment variable
perl Call Perl script using appropriate operating system executable
winqueryreg Item from Windows registry
commandhistory Open Command History window, or select it if already open
commandwindow Open Command Window, or select it if already open
filebrowser Open Current Folder browser, or select it if already open
workspace Open Workspace browser to manage workspace
matlab.io.saveVariablesToScript Save workspace variables to MATLAB script
getpref Preference
setpref Set preference
addpref Add preference
rmpref Remove preference
ispref Test for existence of preference

Topics

Shell Escape Functions

Call external programs by issuing operating system commands<atict:add>.</atict:add>

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?