Course Code: MATH 1194
Course Title: Introduction to Mathematical Software III  A Primer on MATLAB
Level: 1
Semester: 1, II
No. of Credits: 1
Prerequisite(s): Units 1 and 2 of CAPE Pure Mathematics or equivalent or
Math 1125 or equivalent.
Course Rationale
Mathematics is a powerful tool used for solving practical problems and is a highly creative field of study, combining logic and precision with intuition and imagination. The ability to employ mathematical reasoning is a fundamental skill for any welleducated individual in the pure and applied sciences.
Recent improvements in computing technology and mathematical software have inevitably led to a marriage of mathematics and computers. Specialized software can be used to solve problems in differential equations, numerical analysis, calculus, mathematical modelling, and so forth. As such, knowledge of mathematical software is a not only an asset but a necessity for contemporary mathematicians.
This introductory level course is designed to serve as an introduction to MATLAB, which is a very powerful and sophisticated software package. Unfortunately, most powerful packages tend to be somewhat intimidating to a beginner. That is why this course exists – firstly to help the student build confidence when utilizing MATLAB, and ultimately in making the student become more proficient in the functionalities of MATLAB software and its programming language. This knowledge will ultimately serve in creating wellrounded Mathematics students capable of tackling both modelling and numerical analysis work in highlevel undergraduate and postgraduate courses.
Course Description
MATLAB, which stands for Matrix Laboratory, is a software package for highperformance numerical computation and visualization. It provides an interactive environment with hundreds of builtin functions for technical computation, graphics and animation, while providing easy extensibility with its own highlevel programming language.
This course prepares the student to understand and properly apply MATLAB in analyzing and solving problems without a previous knowledge of either MATLAB or computer programming. It first introduces the student to the most useful and easily accessible features of MATLAB. Students will be guided through the MATLAB environment and shown basic functionalities of the package such as the use of MATLAB as a calculator. Online documentation and Help features will be delineated to the students, followed by interactive computation, including but not limited to matrices and vectors. The use of builtin functions and a thorough study on plots, graphics, and animations will be performed. The latter part of the course introduces the student to the programming language of MATLAB, particularly as it relates to the creation of userdesigned functions.
Teaching will take place entirely in weekly interactive lab sessions where the emphasis will be on active learning. Assessment will be based on coursework examinations and several lab assignments
Learning Outcomes
Upon successful completion of this module, students will be able to:
 Use MATLAB commands to perform simple calculations and analyze data.
 Use MATLAB commands to make appropriate programming plots and use the MATLAB Figure Editor to modify those plots to include advanced components such as text comments, arrows and a legend.
 Write a program in MATLAB following good programming practice and using: scalar and array operations, control structures and builtin math functions.
Course Content
 The MATLAB interface and its components. The Command, Graphics and Edit Windows.
 MATLAB as a calculator.
 Output formats.
 Creation of directories and saving files.
 Online documentation and Help.
 Matrices and Vectors
 Creation and manipulation of Matrices and Vectors.
 Difference between vectors and scalars.
 Indexing matrices and Matrix dimensions.
 Matrix multiplication versus elementwise multiplication.
 Performing fundamental linear algebra computations.
 Use of builtin functions in MATLAB.
 Array operations, relational operations and logical operations.
 Elementary mathematical functions.
 Manipulation of character strings.
 Creating and using Inline functions.
 Recording a session with the ‘diary’ command.
 Plots and Graphics
 Use of plotting functions to generate 2D and 3D plots.
 Modifying plots using the Plot Editor.
 Specialized 2D and 3D plots.
 Overlay of plots using the ‘plot’, ‘hold’ or ‘line’ commands.
 Using the ‘subplot’ command to layout multiple graphs.
 Modification of viewing angles in 3D plots.
 Creation of twodimensional grid systems using the ‘meshgrid’ function.
 Saving graphs in various formats and printing of graphs.
 Image processing using MATLAB.
 Animation in MATLAB using ‘comet’ or ‘movie’ command.
 Programming in MATLAB
 Difference between a function and a script.
 Labelling of script files.
 Elements of a function.
 Saving and executing a function either with or without explicit output.
 Evaluation of a function using the ‘feval’command.
 Guidelines for writing good functions.
 Use of ellipsis for continuation.
 Global and local variables.
 Loops, branches and control flow.
 Interactive input: ‘Keyboard’, ‘Menu’ and ‘Pause’ commands.
 Program debugging.
Teaching Methodology
Labs: One (1) computer lab session each week of two (2) hours. Sessions will serve as an avenue for introducing MATLAB.
Assessment
Coursework – 100%
 Two 1hour coursework examinations – 30%
 Coursework #1 – 15%  2 Questions
Practical Computer Lab Exam.
Questions will involve either interactive computation or the formulation and manipulation of plots.
 Coursework #2 – 15%  2 Questions
Practical Computer Lab Exam.
Each question will involve writing a program in MATLAB to help solve a practical mathematical problem.
 One 2hour coursework examination – 30%
 Coursework #3 – 30%  2 Sections
Practical/Theoretical Exam.
This exam will consist of two sections and will test all principles covered in the course. Section I will consist of Multiple Choice questions testing the student on correct MATLAB syntax and procedures.
Section II will consist of structured questions focusing on solving problems in MATLAB.
 Six equally weighted takehome assignments – 40%
Students will be tested on principles learnt during the semester as delineated in the course calendar.
Course Calendar
Week 
Lecture Subjects 
Assignments/Exams


1 
Course Overview/Introduction Introduction to MATLAB and the MATLAB Interface: The MATLAB interface and its components. The Command, Graphics and Edit Windows. MATLAB as a calculator. Output formats. Creation of directories and saving files. Online documentation and Help. 

2 
Matrices and Vectors: Creation and manipulation of Matrices and Vectors. Difference between vectors and scalars. Indexing matrices and Matrix dimensions. Matrix multiplication versus elementwise multiplication. Performing fundamental linear algebra computations. 
Assignment 1 
3 
Builtin Commands and logical functions: Use of builtin functions in MATLAB. Array operations, relational operations and logical operations. Elementary mathematical functions. Manipulation of character strings. Creating and using Inline functions. Recording a session with the ‘diary’ command. 

4 
2D Graphics: Use of plotting functions to generate 2D plots. Modifying plots using the Plot Editor. Specialized 2D plots. Overlay of plots using the ‘plot’, ‘hold’ or ‘line’ commands. Using the ‘subplot’ command to layout multiple graphs. Creation of twodimensional grid systems using the ‘meshgrid’ function. Saving graphs in various formats and printing of graphs. 
Assignment 2 
5 
3D Graphics: Use of plotting functions to generate 3D plots. Modifying plots using the Plot Editor. Specialized 3D plots. Modification of viewing angles in 3D plots. 
Assignment 3 
6 
First Coursework Examination (15%) 

7 
Image Processing: Manipulation of images in MATLAB using the ‘imread’ and ‘imshow’ commands. Animation in MATLAB using ‘comet’ and ‘movie’ commands. 
Assignment 4 
8 
Programming in MATLAB: Difference between a function and a script. Labelling of script files. Elements of a function. Saving and executing a function either with or without explicit output 

9 
Programming in MATLAB  Functions: Evaluation of a function using the ‘feval’ command. Guidelines for writing good functions. Use of ellipsis for continuation. Global and local variables. 
Assignment 5 
10 
Second Coursework Examination (15%) 

11 
Programming in MATLAB  Control Structures: Loops, branches and control flow. 

12 
Interactive input: ‘Keyboard’, ‘Menu’ and ‘Pause’ commands. 
Assignment 6 
13 
Third Coursework Examination (30%) 

Required Reading
Essential Text
 Rudra Pratap, Getting Started with MATLAB: Version 6: A Quick Introduction for Scientists and Engineers, Oxford University Press.