Getting Started | ![]() ![]() |
Use the Command Window to enter variables and run functions and M-files. For more information on controlling input and output, see Controlling Command Window Input and Output.
Lines you enter in the Command Window are logged in the Command History window. In the Command History, you can view previously used functions, and copy and execute selected lines.
To save the input and output from a MATLAB session to a file, use the diary
function.
Running External Programs
You can run external programs from the MATLAB Command Window. The exclamation point character ! is a shell escape and indicates that the rest of the input line is a command to the operating system. This is useful for invoking utilities or running other programs without quitting MATLAB. On Linux, for example,
!emacs magik.m
invokes an editor called emacs
for a file named magik.m
. When you quit the external program, the operating system returns control to MATLAB.
![]() | Desktop Tools | Launch Pad | ![]() |