Professional Documents
Culture Documents
Grading
Homework Assignment 10%
Attendance 5%
MidSem Exam 15%
Project 35%
Final Exam 35%
TENTATIVE SCHEDULE
Date Topics
10/9/2018
Introduction to MATLAB
11/9/2018
17/9/2018
Vectors and Matrices
18/9/2018
24/9/2018 Vectors and Matrices
25/9/2018 Introduction to MATLAB Programming
01/10/2018 Introduction to MATLAB Programming
02/10/2018 Selection Statement
08/10/2018
Loop Statement and Vectorizing Code
09/10/2018
TENTATIVE SCHEDULE
Date Topics
15/10/2018
MATLAB Programs
16/10/2018
22/10/2018
Data Structures: Cell Arrays and Structures
23/10/2018
29/10/2018
Intro to Object-Oriented Programming and Graphics
30/10/2018
05/11/2018
Mid-Semester Exams
06/11/2018
12/11/2018
Mid-Semester Break
13/11/2018
TENTATIVE SCHEDULE
Date Topics
19/11/2018
Project Work Tutorials
20/11/2018
26/11/2018
Submission of Project
27/11/2018
03/12/2018
Final Exams
04/12/2018
Introduction to MATLAB
Lecture 1
inf infinity
NaN stands for “not a number”; e.g. the result of 0/0
Random Numbers
Several built-in functions generate random (actually,
pseudo-random) numbers
Random number functions, or random number
generators, start with a number called the seed; this is
either a predetermined value or from the clock
By default MATLAB uses a predetermined value so it
will always be the same
To set the seed using the built-in clock:
rng(‘shuffle’)
Random Real Numbers
The function rand generates uniformly distributed
random real numbers in the open interval (0,1)
Calling it with no arguments returns one random real
number
To generate a random real number in the open interval
(0,N):
rand * N
randn is used to generate normally distributed
random real numbers
Random Integers
Rounding a random real number could be used to
produce a random integer, but these integers would
not be evenly distributed in the range