1
Introduction
1
CSE 1570
Interacting with MATLAB
Instructor: Aijun An
Department of Computer Science and Engineering
York University
[email protected]
http://www.cse.yorku.ca/course/1570
Introduction
2
Outline
• Starting MATLAB
• MATLAB Windows
• Using the Command Window
•
Some useful commands
• Using MATLAB as a calculator
•
Arithmetic operations with scalars
•
Order of precedence
•
Elementary math builtin functions
Introduction
3
Outline
• Defining scalar variables
•
The assignment operator
•
Rules for variable names
•
Predefined variables
•
Useful commands for managing variables
Introduction
4
Starting MATLAB
On a campus machine, launch MATLAB through the
“start” menu (clicking on the “start” button on the
bottom left corner of the screen):
Start
All Programs
MATLAB
R2010a
MATLAB R2010a
At home, launch MATLAB through WebFAS:
Log into WebFAS at
http://webfas.yorku.ca
with
your FAS account
Click on “Matlab R2011a”
Introduction
5
MATLAB Desktop Window
Introduction
6
MATLAB Windows
Desktop window contains four smaller windows
Command window
Most important window
for issuing commands and displaying the results
Current Folder window (called “Current Directory” in
some previous versions)
Lists the files and subfolders contained in the current folder
The current folder is by default
your personal desktop folder (My Documents), or
F drive (your FAS home directory) when using WebFAS
You can change the current folder (will learn later)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document2
Introduction
7
MATLAB Windows (Cont’d)
Workspace window
Lists the variables currently active
Command History window
Lists the commands that you have entered in the Command
window.
You can close and reopen any window
Click on
x
at the top right corner of the window
Open by selecting the window name from the
Desktop
menu
Get back to default layout of the Desktop:
Desktop
Desktop Layout
Default
Introduction
8
MATLAB Windows (Cont’d)
Three other important windows:
Help window
Provides help information
Can be opened from the
Help
menu or by typing the
doc
command in the Command window
Editor window (will study later)
For writing and editing MATLAB programs and functions.
Can be opened from the
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '12
 HOFBAUER
 Computer Science, matlab

Click to edit the document details