You can execute operating system commands from the MATLAB command line using the ! operator as an alternative to the system function. The exclamation point character (!), sometimes called bang, is a shell escape. The ! character indicates that the rest of the input line is a command to the operating system.
Use ! to call utilities or other executable programs without quitting MATLAB.
For example, the following code opens the Microsoft Excel on a WINDOWS platform:
After the external program completes or you quit the program, the operating system returns control to MATLAB.
To run the application in background mode or display the output in a separate window, add & to the end of the line.
For example, the following statement opens the Microsoft Excel program and returns control to the command prompt so that you can continue running MATLAB commands: