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


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 Save workspace variables to MATLAB script
getpref Preference
setpref Set preference
addpref Add preference
rmpref Remove preference
ispref Test for existence of preference


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?