MATLAB – Computer Programming

 
This course is designed to expose the students on the development of programming skill using a computer language, which is suitable for the current computer operating system. It will emphasize on the general concept of computer programming that includes steps of problem solving using computer, algorithm and program logic tools, interface design, modularization, arrays, files and graphics. Examples, assignments and group projects related to various civil engineering fields are given to the students. At the end of the course, the student should be able to plan, analyst, and write computer programs for basic civil engineering applications.

Week

Topic

Download

1 S2 - Introduction Matlab INTRODUCTION TO COMPUTER PROGRAMMING
Introduction to Computers & Programming Process, Program-Development Life-Cycle (PDLC) Logic Design Tools-Flowchart, Pseudocode

download
2 S1 - Introduction Matlab INTRODUCTION TO MATLAB
MATLAB Environment – Command Window, Workspace, Editor, Managing Files

download
3 S3 - Vectors Matrices VARIABLES AND OPERATORS
Introduction to Variables, Assignment Statements, Data Types
Built-in Functions, Anonymous Functions
HO – MATLAB as a Calculator – Dealing with Simple Problems

download
4 S4 - Matrix Operation Vectors and Matrices – Dimension, Index/Subscript
String Manipulation – Operations on Strings, Converting to Numbers
HO – MATLAB as a Calculator – Dealing with Matrices, Strings

download
5 S5 - Script File INTRODUCTION TO MATLAB PROGRAMMING
Algorithms, MATLAB Scripts – Input and Output, Input/Output using MAT-Files
HO – Creating Simple MATLAB Programs using Script

download
S6 - Two Dimensional Plot The plot Function download
6 S7 - Selection Statements SELECTION STATEMENTS
Relational Expressions – Logical true and falseThe if Statement – Nested if, The switch Statement, Data validation
HO – Applying if Statements

download
7 S8 - Repetition Statements REPETITIVE STRUCTURES
Counted Loop – for Loop, Nested for Loop
Conditional Loop – while Loop, Vectorizing
HO – Applying for Loop & while Loop

download
8 S9 - User Defined Function USER DEFINED FUNCTIONS
Introduction to User-Defined Functions Modularisation, Subfunction
HO – Applying UDF, Debugging – Tracing Errors

download
9 S10 - Modularisation Scope of Variables, Workspace
Nested Function
HO – Dealing with Modular Programs & Variables Scope

download
10 DATA STRUCTURES
Introduction to Arrays & Structures – Passing to function
Vectors of Structures – Nested Structures
HO – Applying Data Structures

11 S11 - File Management DATA & FILE MANAGEMENT
Introduction to Data & Record FilesAccess Methods & Common File Operations
HO – Writing & reading data files

download
12 Writing Report files
Reading Report files
HO – Writing & Reading Report Files

13 S12 - (Project) - GUI GRAPHICAL USER INTERFACES
Introduction to GUI – How does it work?
Event-Driven Programming using GUI
HO – Dealing with simple GUI

download
14 callback function for Push Button
Sharing Variables using guidata
HO – Creating GUI – for Previously Developed Programs