System Commands - MATLAB & Simulink (original) (raw)

Main Content

Interact programmatically with operating system and MATLABĀ® environment

System commands provide programmatic access to your operating system and the MATLAB environment. Using these commands, you can access information about your computer, copy content to the system clipboard, get and set environment variables, and execute operating system commands. To access and modify options for tools within MATLAB, such as the Command Window, Editor, or App Designer, use settings. To store and access your own data across MATLAB sessions, create custom settings.

Functions

expand all

clipboard Copy and paste text to and from system clipboard
computer Information about computer on which MATLAB is running
system Execute operating system command and return output
cmdsep Command separator for current platform (Since R2023b)
dos Execute DOS command and return output
unix Execute UNIX command and return output
getenv Get environment variable
loadenv Load environment variables from .env and plain text files (Since R2023a)
isenv Determine if environment variable exists (Since R2022b)
setenv Set environment variable
unsetenv Remove environment variable (Since R2022b)
perl Call Perl script using operating system executable
winqueryreg Item from Windows registry

Settings

Topics