An interactive introduction to MATLAB

(Jeff_L) #1

1 basic concepts


1.1 MATLABin the School of Engineering


MATLABis currently available under Microsoft Windows 7 and Linux oper-
ating systems in the School of Engineering Computing Labs
(http://www.eng.ed.ac.uk/it/TLabs/), and also under Microsoft Windows 7 in
all Open Access Computing Labs (http://www.ed.ac.uk/schools-departments/information-
services/services/computing/desktop-personal/open-access/locations/locations).
To launchMATLABunder Microsoft Windows 7 in a University of Edin-
burgh computing lab click on its shortcut, located at StartAll Programs
MATLABMATLAB R2011a.


1.2 TheMATLABenvironment


When you launchMATLAByou are presented with theMATLABdesktop
(Figure 2) which, by default, is divided into 4 windows:



  1. Command Window: This is the main window, and contains the command
    prompt (»). This is where you will type all commands.

  2. Command History: Displays a list of previously typed commands. The
    command history persists across multiple sessions and commands can be
    dragged into the Command Window and edited, or double-clicked to run
    them again.

  3. Workspace: Lists all the variables you have generated in the current
    session. It shows the type and size of variables, and can be used to
    quickly plot, or inspect the values of variables.

  4. Current Directory: Shows the files and folders in the current directory.
    The path to the current directory is listed near the top of theMATLAB
    desktop. By default, aMATLABfolder is created in your home directory
    on your M:drive, and this is where you should save your work.


You will use and become more familiar with the different areas of theMATLAB
desktop as you progress through this course.

3
Free download pdf