MATLAB Operating System Commands

 

ans                   Default MATLAB variable that stores calculation results

cd text:            Change current working directory to ‘text’.

clc                    Clears the command screen.

clear                 Clears workspace memory.

CTRL-C          Causes an abort of a MATLAB command.

delete file         Delete file ‘file’.

diary                 Creates a script file of MATLAB session.

dir                    Directory listing (see ‘ls’).

exit                   Exits MATLAB.

help                  Starts MATLAB help.

help file            Displays the first comments of the m-file ‘file’.

load                  Loads a saved workspace file.

ls                      List files and directories (see ‘dir’).

mkdir text        Make directory ‘text’.

!rmdir text        Remove directory ‘text’.

pause               Temporarily halts a MATLAB program.

pi                     Default MATLAB variable that stores the value p

pwd                 Print Working Directory.

quit                   Quits MATLAB.

type file            Displays the contents of the m-file ‘file’.

what                 Lists the m-files stored in the current directory

who                  Lists the variables stored in the workspace memory

whos                Lists the workspace variables and their sizes

 

‘i’ or ‘j’            MATLAB variables that hold unless otherwise specified