Execute UNIX command and return output
For platform-independent code, use the system command.
[
calls the operating system to execute the specified command and returns the standard
output of the command to status,cmdout]
= unix(command)cmdout.
MATLAB® uses a shell program to execute the given command. It determines which
shell program to use by checking environment variables on your system. MATLAB first checks the MATLAB_SHELL variable, and if
either empty or not defined, then checks SHELL. If
SHELL is also empty or not defined, MATLAB uses /bin/sh.
For tips and information about limitations, see system.