system
Execute operating system command and return output
Syntax
Description
calls
the operating system to execute the specified command. The operation
waits for the command to finish execution before returning the exit
status of the command to the status
= system(command
)status
variable.
The function starts a new cmd/shell process, executes
command
, exits the process, and returns to the
MATLAB® process. Updates to the system environment made by
command
are not visible to MATLAB.
Examples
Input Arguments
Output Arguments
Limitations
MATLAB converts characters to the encoding that your operating system shell accepts. Output from the
command
is converted to the MATLAB encoding to be displayed in the command window. If you get unexpected results from the command, enter thecommand
argument directly at the operating system prompt to see how the operating system treats your input.Callback functions are not called while the
system
command is executing.