Visual Programming with Matlab

Spring 2007
Th. 745—1105 AM  Lab: 4/8
MIN1M2, 4 credits, compulsory
Department of Information Technologies
Office Hours: By appointment (usually 345—440 PM on Mon )
Office: 4/104

Course Objectives

The primary objective of this course is to introduce students to the fundamental concepts and techniques of programming. Students will develop applications using Matlab.


Three assignments will be given during the course. They will account for 25% of the grade of the students . The assignments are small programming exercises. Programs will be graded on correctness. All assignments are due at the start of class on the due date. Assignments are individual work unless otherwise specified.



Assignments: 75 %
Labs (including attendance): 25 %

Recommended readings

1. Two short introduction to Matlab programming [view paper 1][view paper 2]
2. Amos Gilat: Matlab: An introduction with applications, Wiley, 2004, ISBN: 978-0-471-69420-5

Class Schedule (tentative)


Week 1: Introduction to Matlab. Basic commands, using the environment. editing figure properties by using visual tools. Plotting. Vectors and matrices.
Week 2: Customizing plots programmatically and by the help of visual tools. Creating scripts and functions. Executing functions at once and step-by-step. Flow control. If –else and switch-case statements. Implementing an algorithm given in form of a flow chart. Displaying different values in Command Window and in message boxes. Saving and reusing figures. Creating HTML documentation.
Week 3: Flow control. While loop, for loop. Numerical integration using trapezoidal approximation. Integration by symbolic toolbox. Formatted output. fprintf.  Functions of two variables. Three dimensional plots.
Week 4: Three dimensional plots (mesh, surf, contour, meshc). Using subplots. Plotting a sphere, a cylinder, a cone, a set of balloons, and a vase. Drawing polyhedrons (patch). Creating an animation: throwing under the angle α with a release velocity v. [HTML]
Week 5: Creating a graphical user interface. Using guide to build GUI application. Structures. Callback functions. Text and numerical data representation. Using button groups for mutually exclusive selection. Using popup menus. Plotting on an axes component. Ex. 1. Creating GUI with GUIDE Matlab demo. Ex. 2. Creating a GUI for the calculation of the roots of a quadratic equation. [Source code]
Week 6: Creating a GUI for the throwing program. Assignment for individual work: create a program with GUI that converts the values from Celsius to Fahrenheit and vice versa. Creating pushbuttons containing arrows. [Source code]
Week 7: Design of a cylindrical tank with a hemispheric part. Goal: minimum cost. Creating a GUI for the calculations. Working with experimental data. Reliability calculations I. [Source code]
Week 8: Solving linear equations. Linear Regression [HTML]. Polynomial Regression [HTML]. Linear interpolation [HTML]. Reliability calculations II. [HTML] [Source code]
Week 9: Assignment 1. Create a GUI program for the simulation of the motion of the two parts of a robot arm [Executable version][Source code].
Week 10: Assignment 2. Develop a GUI program for the picnic table leg problem [Executable version][Source code]. Plotting a circle [HTML]. Flipping ball animation [HTML] [Source code]
Week 11: